rtconner / laravel-tagging

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

Method title does not exist. #23

Closed 0x1ad2 closed 9 years ago

0x1ad2 commented 9 years ago

When adding a tag the application throws an error Method title does not exist.

I've tried to trace it and it get thrown at \Str::title on line 137 from TaggableTrait.php it only happens on my server and not when I run the application locally.

Looks like the application can't invoke the methods from the class that is loaded on line 3 or something in that way.

0x1ad2 commented 9 years ago

I wrote a quick and dirty fix for it but it isn't eligible for a commit. I've just replaced the displayer part with the normal non-modified tag name.

rtconner commented 9 years ago

Ok you could also setup the configuration (see the docs) and then use a custom function instead of Str::title

0x1ad2 commented 9 years ago

@rtconner thanks that's a good alternative! I've also found the problem, I worked with someone else code base and that person loaded an other Illuminate package that was outdated.

Again, thanks for taking the time and the solution.

rtconner commented 9 years ago

You are probably missing the \Str alias in your installation app.php

0x1ad2 commented 9 years ago

No the alias was available but for some reason the developer included a whole new illuminate package in his workbench module and somehow that one was chosen as the default instead of the one located in the vendor directory.