常用目录获取

注: xxx 表示 项目 根目录,base... 表示绝对路径

方法 路径
app_path() base.../xxx/app
app_path('Http/Controllers/Conteroller.php') base.../xxx/app/Http/Controllers/Conteroller.php
base_path() base.../xxx
base_path('vendor') base.../xxx/vendor
config_path() base.../xxx/config
config_path('app.php') base.../xxx/config/app.php
public_path() base.../xxx/public
public_path('index.php') base.../xxx/public/index.php
database_path() base.../xxx/database
database_path('seeds') base.../xxx/database/seeds
storage_path() base.../xxx/storage
database_path('app/public') base.../xxx/database/app/public