PHP code example of jianastrero / jugger-api
1. Go to this page and download the library: Download jianastrero/jugger-api library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jianastrero / jugger-api example snippets
'providers' => [
...
JianAstrero\JuggerAPI\JuggerAPIServiceProvider::class
...
]
use Notifiable, HasApiTokens;
public function boot()
{
$this->registerPolicies();
Passport::routes();
}
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'passport',
'provider' => 'users',
],
'juggeradmin-api' => [
'driver' => 'passport',
'provider' => 'juggeradmins',
],
'juggeradmin' => [
'driver' => 'session',
'provider' => 'juggeradmins',
],
...
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
'juggeradmins' => [
'driver' => 'eloquent',
'model' => JianAstrero\JuggerAPI\Models\JuggerAdmin::class,
]
],
],
use Notifiable, HasApiTokens, HasTable, CanMutate;
protected $fillable = [
'name', 'email', 'password',
];
protected $casts = [
'array_column' => 'array'
];
protected $juggerCasts = [
'myfile' => 'file'
];