I'm currently in the process of trying to include this package in my Laravel app: https://github.com/tappleby/laravel-auth-token
I included "tappleby/laravel-auth-token": "0.3.*"
in composer.json, like this:
"require": {
"laravel/framework": "4.2.*",
"intervention/image": "dev-master",
"laracasts/flash": "~1.0",
"laracasts/validation": "1.1.*",
"tappleby/laravel-auth-token": "0.3.*"
}
And I added 'Tappleby\AuthToken\AuthTokenServiceProvider'
and 'AuthToken'=>'Tappleby\Support\Facades\AuthToken','AuthTokenNotAuthorizedException' =>'Tappleby\AuthToken\Exceptions\NotAuthorizedException'
to app/config/app.php
.
Afterwards I ran composer install
. This is the way I always added packages, but now I get an error every time: [RuntimeException]
Error Output: PHP Fatal error: Class 'Tappleby\AuthToken\AuthTokenServiceProvider' not found in /var/www/example.com/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157
Goto bootstrap/cache folder and delete config.php
Then run
composer dump-autoload
As Marcin said you shouldn't use
composer install
but
composer update
Second thing remove all the lines added to app/config/app.php
First run composer update
after that put those lines in app/config/app.php
Then run php artisan config:publish tappleby/laravel-auth-token
in your command line
It should publish your configuration and now you should be able to use the relevant classes
Order is mandatory, run composer update
then add the service provider and aliases to app.php
php artisan optimize:clear
composer install
If that don't work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With