文件名称:laravel注释
文件大小:12KB
文件格式:ZIP
更新时间:2024-02-24 06:38:58
laravel comments Laravel
Laravel值得评论 安装 在项目的根目录中需要带有此软件包。 $ composer require artisanry/commentable 首先,您需要发布供应商资产并迁移: php artisan vendor:publish --provider="Artisanry\Commentable\CommentableServiceProvider" && php artisan migrate 用法 建立模型 <?php namespace App ; use Artisanry \ Commentable \ Traits \ HasComments ; use Illuminate \ Database \ Eloquent \ Model ; class Post extends Model { use HasComments ; } 建立评论 $ user = User :: first (); $ post = Post :: first (); $ comment = $ post -> comment ([ 'title' => 'Some
【文件预览】:
laravel-commentable-master
----database()
--------migrations()
----src()
--------CommentableServiceProvider.php(1KB)
--------Models()
--------Traits()
----config()
--------commentable.php(633B)
----LICENSE(16KB)
----README.md(2KB)
----renovate.json(58B)
----composer.json(1KB)