rtconner / laravel-tagging

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

Difficulties when trying to install and use the package #31

Closed thomas-boll closed 9 years ago

thomas-boll commented 9 years ago

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:

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

thomas-boll commented 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.

rtconner commented 9 years ago

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?

thomas-boll commented 9 years ago

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).

thomas-boll commented 9 years ago

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?

thomas-boll commented 9 years ago

Calling php artisan migrate --path=vendor/rtconner/laravel-tagging/migrations did it. Thanks.

rtconner commented 9 years ago

Are you on Laravel 5 or Laravel 4? I'm not understanding why vendor:publish is not working for you.

thomas-boll commented 9 years ago

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.

RomainLanz commented 9 years ago

@rtconner

You only publish your config.

public function boot() {
    $this->publishes([
        __DIR__.'/../../../config/tagging.php' => config_path('tagging.php'),
    ]);
}
rtconner commented 9 years ago

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

RomainLanz commented 9 years ago

Maybe better to write ~1.0 instead of ~1.0.1 if you follow semantic versioning.

Minor fix is not a problem.

RomainLanz commented 9 years ago

@rtconner Did you set autoupdate on packagists? The update still not work.

rtconner commented 9 years ago

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

:/

rtconner commented 9 years ago

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.

RomainLanz commented 9 years ago

Seems to be good now :+1:

rtconner commented 9 years ago
Don't forget to "Star" the package if you like.