{success} gitee仓库·Laravel版
{info} gitee仓库·Hyperf版
小丑路人https://bbs.cnpscy.com

PHP7.4+Laravel8vue-element-adminv14.*composer install
cp .env.example .envphp artisan key:generatephp artisan jwt:secretphp artisan sync:database:tablesphp artisan command:autotablebuildphp artisan schedule:run
* * * * * www php artisan schedule:run >> /dev/null 2>&1php artisan queue:work database --daemon --queue=default
php artisan queue:work database --queue=default按月、按年分表的模型,皆不可使用 with,可使用 load 代替,static::query 会重新 实例化当前模型,之前设置的分表名称将被替换。
具体原因看代码:
/**
* Begin querying a model with eager loading.
*
* @param array|string $relations
* @return \Illuminate\Database\Eloquent\Builder
*/
public static function with($relations)
{
return static::query()->with(
is_string($relations) ? func_get_args() : $relations
);
}
为模型生成注释
php artisan ide-helper:models
生成 PHPstorm Meta file
php artisan ide-helper:meta
为 Facades 生产注释
php artisan ide-helper:generate
