Closed thomas-boll closed 9 years ago
Forget about the last error ... I just realized addTag()
is private (shame on me...).
But still the other two may be fixed in the readme.
Thanks for the attention.
After following the readme steps I had to copy the migrations to my migrations folder by hand so the tables are created when calling php artisan migrate
Did you add the service provider to app.php first? Did you call vendor:publish next? Did you call migrate 3rd?
Thanks both for that super fast fix. I will uninstall the package and try again.
And: yes: I added the service provider to app.php first. (shouldn't I?) no: I did not call vendor:publish next nor migrate 3rd (haven't been aware of them yet).
Now I tried again and the migrations still do not seem to be published. (Maybe I did something wrong?)
For uninstallation I did the following (I do not know better right now):
For installation:
The migrations still don't get published.
Also I do not know how to call migrate 3rd: Is it a php artisan command?
Calling php artisan migrate --path=vendor/rtconner/laravel-tagging/migrations did it. Thanks.
Are you on Laravel 5 or Laravel 4? I'm not understanding why vendor:publish is not working for you.
yes:
php artisan --version
gives me Laravel Framework version 5.0.13
I too do not understand why it doesn't work but I can live with the additional migrate command. If it works on your installation I will keep this closed.
@rtconner
You only publish your config.
public function boot() {
$this->publishes([
__DIR__.'/../../../config/tagging.php' => config_path('tagging.php'),
]);
}
Oh. Dangit, this is all packagists fault :(. But I suppose I should upate the readme also. You need version 1.0.1 and not 1.0.0
Maybe better to write ~1.0
instead of ~1.0.1
if you follow semantic versioning.
Minor fix is not a problem.
@rtconner Did you set autoupdate on packagists? The update still not work.
Yes packagist auto updates. And I've forced update a dozen times. I just deleted 1.0.0. Now packagist won't populate with 1.0.1
:/
Well .. I have no idea the issue on packagist .. but anyways .. I just created 1.0.2 (which is identical to 1.0.1) And I deleted 1.0.0
So clear your local cache and composer update. Should be ok.
Seems to be good now :+1:
Hi Rob (or anybody else listening),
first: Thanks for the package!
When I follow the steps in the readme the trait does not seem to work out of the box.
Issues:
php artisan migrate
(maybe intended to do so but not (yet) in the readme)use Conner\Tagging\TaggableTrait;
I get aPHP Fatal error: Trait 'App\Conner\Tagging\TaggableTrait' not found
. I worked around it by changing it touse \Conner\Tagging\TaggableTrait;
$mymodel->addTag('mytag');
in one of my database seeders stating:[BadMethodCallException] Call to undefined method Illuminate\Database\Query\Builder::addTag()
Now I am stuck. Maybe I do something wrong because I am not very experienced with laravel nor with php. So please excuse any bothering with noob questions ... :-)
Any help would be great. Also I really would like to use your package to save me some time.
Environment: fresh laravel 5 project on homestead. My models live in the App namespace as by default laravel 5 installation.
Regards, Thomas