Skip to main content

Intro

Let's start with Laravel Suda.

Versions


LaravelSudaPHP
11.x11.x(current)8.2+
10.x10.x8.1+
9.x9.x8.0.2+
8.x8.x8.0+
7.x5.2.17.2~7.4

Requirments

Install

Need to install Laravel before, reference to Laravel

  1. require Suda
composer require gtdxyz/suda
  1. .env
#========= edit .env =========
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=database_user
DB_PASSWORD=pass
  1. Suda
php artisan suda:install
  1. suda config
#========= edit .env =========
# If Chinese,
'locale' => 'zh_CN',
'timezone' => 'Asia/Shanghai',


#========= edit config/filesystems.php =========

//add to links
public_path('suda') => storage_path('app/suda'),

#========= edit config/auth.php =========

'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
// ADD operate guard
'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',
// ],
],

start

Suda 10+

ItemContentRemark
Loginyourdomain.com/adminchange 'admin' in config/sudaconf.php
Accountadmin@suda.run
Passwordsuda#2021