建立Migration的指令 php artisan make:migration {action}_{table}_table php artisan make:migration create_items_table 常用欄位設定 $table->id(欄位名稱) 自動流水號 $table->boolean(欄位名稱) 布林值 $table->integer(欄位名稱) 整數 $table->string(欄位名稱,長度) 長度為xx的字串 $table->text(欄位名稱) 長字串
12/8/2022Collective HTML套件安裝 Step 1.下載套件 composer require laravelcollective/html:"5.8.0" //針對5.8版本 composer require laravelcollective/html //針對8.x版本 Step 2.註冊provider與alias(Laravel 5.4以上非必須) 加入provider,請編輯config/app.php 在providers陣列加入以下程式碼:
11/30/2022簡介 Laravel 的 Illuminate\Http\Request 類別提供一種物件導向的方式來讓你和應用的 HTTP 請求去進行互動。也就是取得由請求所提交的輸入項 . cookies 和 檔案 與請求互動 取得請求 要通過依賴注入取得當前的 HTTP 請求實例,你要在控制器上加入 Illuminate\Http\Request 類別。需要傳入的請求實例將會由服務容器來自動注入: <?php namespace App\Http\Controllers;
11/28/2022如何開始? Laravel開發環境建置 應用設定 資料夾結構說明 部署到雲端伺服器 基礎知識 路由 Route
8/19/2022or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up