PHP code example of gtdxyz / suda

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

    

gtdxyz / suda example snippets


# edit config/app.php
# Chinse
'locale' => 'zh_CN',
'timezone' => 'Asia/Shanghai',

# edit config/auth.php

'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'users',
    ],
	 // add operate
    'operate' => [
        'driver'    => 'session',
        'provider'  => 'operates',
    ],
],

'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => App\Models\User::class,
    ],
	 
	 // add provider
    'operates' => [
        'driver' => 'authsuda_provider',
        'model' => Gtd\Suda\Models\Operate::class,
    ],

    // 'users' => [
    //     'driver' => 'database',
    //     'table' => 'users',
    // ],
],