# Composer autoload (自動載入) 在 composer.json 檔案中 "autoload" 處添加欲載入的檔案,例如: ``` "autoload": { "classmap": [ "database/seeds", "database/factories" ], "psr-4": { "App\\": "app/" }, "files": [ "bootstrap/helpers.php" <-載入的檔案 ] }, ``` 執行 `$ composer dump-autoload` 再進入 tinker 後就可以執行檔案中的函數。  ###### tags: `Laravel`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up