PHP code example of lsshu / site-api

1. Go to this page and download the library: Download lsshu/site-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/ */

    

lsshu / site-api example snippets


 'disks' => [
        ·
        ·
        ·
        'root' => [
            'driver' => 'local',
            'root' => base_path('/')
        ]
    ]

'guards' => [
        ·
        ·
        ·
        'site-api' => [
            'driver' => 'jwt',
            'provider' => 'roots',
            'hash' => false,
        ],
    ],


'providers' => [
        ·
        ·
        ·
        'roots' => [
            'driver' => 'eloquent',
            'model' => Lsshu\Site\Api\Models\SystemUser::class,
        ],
    ],

protected $routeMiddleware = [
        .
        .
        .
        // 检查权限
        'check.permissions' => \Lsshu\Site\Api\Middleware\CheckPermissions::class
    ];
shell
php artisan vendor:publish --provider="Lsshu\Site\Api\ServiceProvider" --tag="config"
shell
php artisan migrate
shell
php artisan site-api:seed-permission
shell
php artisan jwt:secret