PHP code example of devdr / api-crud-generator

1. Go to this page and download the library: Download devdr/api-crud-generator 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/ */

    

devdr / api-crud-generator example snippets


php artisan crud:api-generator User

'api.auth' => \DevDr\ApiCrudGenerator\Middleware\CheckAuth::class,

$user = $request->get('users');

public static function findIdentityByAccessToken($token, $type = null)
{
    return static::where(['auth_token' => $token])->first();
}

$user = $this->_checkAuth();