###Composer Permission denied
- Check the permissions of the directory
/usr/local/bin/
- Check the permissions of the project directory
composer/*
The process has to write both, the file and into the directory which both must be granted.
###Composer Permission denied
/usr/local/bin/
composer/*
The process has to write both, the file and into the directory which both must be granted.
The API return error like this:
{
"message": "Class Api\\Controllers\\AuthController does not exist",
"status_code": 500,
"debug": {
"line": 280,
...
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/",
"Api\\": "app/Api/"
}
},
$ composer dump-autoload
##Adding Font Awesome to app.scss
###In gulpfile.js
elixir(function(mix) {
mix.sass('app.scss')
...
.copy(
'bower_components/font-awesome/fonts',
'public/fonts');
});
###In app.scss
@import "bower_components/font-awesome/scss/font-awesome";
###Run gulp command
$ gulp
### error on running gulp first time | |
``` | |
module.js:327 | |
throw err; | |
^ | |
Error: Cannot find module 'laravel-elixir' | |
at Function.Module._resolveFilename (module.js:325:15) | |
at Function.Module._load (module.js:276:25) | |
... | |
``` | |
Delete `node_modules`, run `npm install` again |
###Install
Add this to composer.json
"require": {
"tymon/jwt-auth": "0.5.*"
}
$ composer update
###Setup
Add provider and alias to config/app.php
'providers' => [
Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,
],
'aliases'=>[
'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class,
]
###Publish
$ php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\JWTAuthServiceProvider"
###Generate Key
$ php artisan jwt:generate
###Location of generated key
// config/jwt.php
[
'secret' => env('JWT_SECRET', 'your_personal_jwt_secret_key')
]
###Errors
Unable to boot ApiServiceProvider, configure an API domain or prefix.
Add this to .env
file
API_PREFIX=api
$ php artisan config:cache