Laravel项目创建

本文最后更新于:5 个月前

安装laravel

1
2
composer create-project laravel/laravel Laravel --prefer-dist "8.5.*"

安装 Dcat Admin 后台

1
2
3
4
5
6
composer require dcat/laravel-admin:"2.*" -vvv

php artisan admin:publish

php artisan admin:install

安装辅助工具

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
composer require barryvdh/laravel-ide-helper --dev

# 如果只想在开发环境安装请加上 --dev
composer require "doctrine/dbal: ~2.3" --dev

# 导出配置文件
php artisan vendor:publish --provider="Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider" --tag=config

# 为 Facades 生成注释
php artisan ide-helper:generate

# 为数据模型生成注释
php artisan ide-helper:models

# 生成 PhpStorm Meta file
php artisan ide-helper:meta