PHP code example of agilepixels / laravel-commentable
1. Go to this page and download the library: Download agilepixels/laravel-commentable library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
agilepixels / laravel-commentable example snippets
namespace App;
use Illuminate\Database\Eloquent\Model;
use AgilePixels\Commentable\Traits\HasComments;
class Product extends Model
{
use HasComments;
}
namespace App;
use Illuminate\Database\Eloquent\Model;
use AgilePixels\Commentable\Traits\AddsComments;
class User extends Model
{
use AddsComments;
}
bash
php artisan vendor:publish --provider="AgilePixels\Commentable\CommentableServiceProvider" --tag="migrations"
bash
php artisan migrate
bash
php artisan vendor:publish --provider="AgilePixels\Commentable\CommentableServiceProvider" --tag="config"