PHP code example of owllog / laravel-taggy

1. Go to this page and download the library: Download owllog/laravel-taggy 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/ */

    

owllog / laravel-taggy example snippets


/*
 * Package Service Providers...
 */
Owllog\LaravelTaggy\LaravelTaggyServiceProvider::class,



namespace App;

use Illuminate\Database\Eloquent\Model;
use Owllog\LaravelTaggy\Traits\Taggable;

class Lesson extends Model
{
    use Taggable;
}

$lesson = Lesson::find(38);

$lesson->tag(['velit', 'Rerum', 'dolorem', 'quo']);

$lesson = \App\Lesson::find(1);
$lesson->tags();
shell
$ php artisan migrate