rtconner / laravel-tagging

Tag support for Laravel Eloquent models - Taggable Trait
MIT License
882 stars 168 forks source link

Call to undefined method Illuminate\Database\Query\Builder::tag() #128

Closed jigsawsoul closed 5 years ago

jigsawsoul commented 7 years ago

Hi,

Following this tutorial but I have the error Call to undefined method Illuminate\Database\Query\Builder::tag()

I have run the migrations, added the service provider, and the vendor file.

use Conner\Tagging\Taggable;

class AdminJobController extends Controller
{
    use Taggable;
$job = Jobs::create($request->all());
$job->tag($request->input('categories'));

Any ideas

akiyamaSM commented 7 years ago

@jigsawsoul the Job Model should have the Taggable trait and not the controller ;)