Laravel Framework version: 8.12.3 本範例做了兩個,一個是進到首頁顯示hello world!,另一個是進到article頁面時,從資料庫把文章抓出來顯示。 Routes設定如下: 接著看看首頁的Controller, View: 再來看看article的Controller, Model, View: 從phpmyadmin檢視article table: Source code請參考我的github: https://github.com/snailsmall612/laravel-8-hello-world Note: 1. 新建controller檔案指令: $ php artisan make:controller HomeController2. 新建model檔案指令: $ php artisan make:model Article3. 從config\database.php中可以看到,預設是使用mysql資料庫。從.env檔案可以修改database name, 帳密等等資訊: 本筆記參考:1. http://blog.tonycube.com/p/laravel-4.html?fbclid=IwAR1aOL7w4STMKA1O60KT4xvilVwX6WsjVqHOzW2KsLKLG9KPdoRqB_VfcL42. https://stackoverflow.com/questions/58326355/sqlstatehy000-1049-unknown-database-laravel3. https://stackoverflow.com/questions/28931640/class-app-http-controllers-view-not-found-error