janakkapadia / commentable
Commentable - Easy way to apply comment on any model.
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:package
Requires
- php: ^7.3|^8.0
- illuminate/auth: ^6.0|^7.0|^8.0
- illuminate/database: ^6.0|^7.0|^8.0
- illuminate/support: ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0
README
Package setup steps:
-
Go to project root directory from terminal
-
Run following commands:
composer require janakkapadia/commentable php artisan vendor:publish --tag=comment-migrations php artisan migrate
-
You need add trait in following model:
use HasComments;
-
Create Comment:
$model->comments()->create([ "comment" => "add content here" ]);