1. Go to this page and download the library: Download uccello/uccello-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/ */
uccello / uccello-api example snippets
namespace App;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements JWTSubject
{
use Notifiable;
// Rest omitted for brevity
/**
* Get the identifier that will be stored in the subject claim of the JWT.
*
* @return mixed
*/
public function getJWTIdentifier()
{
return $this->getKey();
}
/**
* Return a key value array, containing any custom claims to be added to the JWT.
*
* @return array
*/
public function getJWTCustomClaims()
{
return [];
}
}
return [
...
'api' => [
'items_per_page' => 300, // Items per page
'max_items_per_page' => 800, // Max items per page (useful if length URL param greater than max_item_per_page)
'throws_exception' => true, // If true send an email to user with username defined below
'username_to_notify_on_exception' => env('USERNAME_TO_NOTIFY_ON_EXCEPTION')
],