App下載

詞條

大約有 7,000 項符合查詢結(jié)果 ,庫內(nèi)數(shù)據(jù)總量為 78,250 項。(搜索耗時:0.0127秒)

4281.Laravel 8 資源集合

...資源集合響應(yīng),你需要創(chuàng)建一個專用的資源來表示集合:php artisan make:resource UserCollection 你可以輕松地在已生成的資源集合類中定義任何你想在響應(yīng)中返回的元數(shù)據(jù):<?php namespace App\Http\Resources; use Illuminate\Http\Resources\Json\Resourc...

http://www.o2fo.com/laravel_8/laravel_8-zrjc3i8l.html

4282.Laravel 8 數(shù)據(jù)包裹

...自定義鍵而不是 data,可以在資源類上定義 $wrap 屬性:<?php namespace App\Http\Resources; use Illuminate\Http\Resources\Json\JsonResource; class User extends JsonResource { /** * 應(yīng)該應(yīng)用的「數(shù)據(jù)」包裝器 * * @var string */ public static $wrap = 'user'; } 你可...

http://www.o2fo.com/laravel_8/laravel_8-xdnj3i8o.html

4283.Laravel 8 隱藏 JSON 屬性

...隱藏,比如密碼,則可以在模型中添加 $hidden 屬性:<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class User extends Model { /** * 數(shù)組中的屬性會被隱藏 * * @var array */ protected $hidden = ['password']; } 注意:隱藏關(guān)聯(lián)時,需使...

http://www.o2fo.com/laravel_8/laravel_8-nas13i9a.html

4284.Laravel 8 追加 JSON 值

...應(yīng)屬性。要實現(xiàn)這個功能,首先要定義一個 修改器。<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class User extends Model { /** * Get the administrator flag for the user. * * @return bool */ public function getIsAdminAttribute() { return $this->attribut...

http://www.o2fo.com/laravel_8/laravel_8-5wxl3i9c.html

4285.Laravel 8 Artisan 測試運行器

phpunit 命令之外, 您還可以使用 Artisan 的 test 命令來運行你的測試。Artisan 測試運行器提供了關(guān)于當(dāng)前正在運行的測試的更多信息,以便于日常開發(fā)與調(diào)試:php artisan test 任何可以傳遞給 phpunit 命令的參數(shù)也可以傳遞給 Artisan ...

http://www.o2fo.com/laravel_8/laravel_8-cqrn3i9m.html

4286.Laravel 8 Session / 身份驗證

...的測試請求發(fā)送之前,就會先去給數(shù)據(jù)加載 session:<?php class ExampleTest extends TestCase { public function testApplication() { $response = $this->withSession(['foo' => 'bar']) ->get('/'); } } 當(dāng)然,一般使用 session 時都是用于維護(hù)...

http://www.o2fo.com/laravel_8/laravel_8-8phr3i9t.html

4287.Laravel 8 創(chuàng)建工廠

...每列的值。要創(chuàng)建工廠,請使用 make:factory Artisan 命令:php artisan make:factory PostFactory 新工廠將放置在您的 database/factories 目錄中。--model 選項可用于指示工廠創(chuàng)建的模型的名稱。 此選項將使用給定的模型預(yù)先填充生成的工廠文件...

http://www.o2fo.com/laravel_8/laravel_8-jvq23ifg.html

4288.Laravel 8 Facades

...擬對 Laravel Facade 的調(diào)用。比如下面控制器中的行為:<?php namespace App\Http\Controllers; use Illuminate\Support\Facades\Cache; class UserController extends Controller { /** * 顯示該應(yīng)用程序的所有用戶的列表. * * @return Response */ public function index() { $value...

http://www.o2fo.com/laravel_8/laravel_8-6p783igg.html

4289.Laravel 8 升級 Horizon

...升級到新的 Horizon 版本時,你應(yīng)該重新發(fā)布 Horizon 資源:php artisan horizon:publish 為了使資源文件保持最新并避免以后的更新中出現(xiàn)問題,你可以將以下命令添加到 composer.json 文件中的 post-update-cmd 腳本中:{ "scripts": { "post-update-cmd"...

http://www.o2fo.com/laravel_8/laravel_8-i7zc3ih9.html

4290.Laravel 8 UUID 的客戶端

...ient 的主鍵,而不是使用自動遞增的整數(shù)作為主鍵。執(zhí)行 php artisan passport:install --uuids 后,您將得到關(guān)于禁用 Passport 默認(rèn)遷移的相關(guān)指令說明:php artisan passport:install --uuids

http://www.o2fo.com/laravel_8/laravel_8-uhmc3ihp.html

抱歉,暫時沒有相關(guān)的微課

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

抱歉,暫時沒有相關(guān)的視頻課程

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

抱歉,暫時沒有相關(guān)的教程

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

4281.Laravel 8 資源集合

...資源集合響應(yīng),你需要創(chuàng)建一個專用的資源來表示集合:php artisan make:resource UserCollection 你可以輕松地在已生成的資源集合類中定義任何你想在響應(yīng)中返回的元數(shù)據(jù):<?php namespace App\Http\Resources; use Illuminate\Http\Resources\Json\Resourc...

http://www.o2fo.com/laravel_8/laravel_8-zrjc3i8l.html

4282.Laravel 8 數(shù)據(jù)包裹

...自定義鍵而不是 data,可以在資源類上定義 $wrap 屬性:<?php namespace App\Http\Resources; use Illuminate\Http\Resources\Json\JsonResource; class User extends JsonResource { /** * 應(yīng)該應(yīng)用的「數(shù)據(jù)」包裝器 * * @var string */ public static $wrap = 'user'; } 你可...

http://www.o2fo.com/laravel_8/laravel_8-xdnj3i8o.html

4283.Laravel 8 隱藏 JSON 屬性

...隱藏,比如密碼,則可以在模型中添加 $hidden 屬性:<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class User extends Model { /** * 數(shù)組中的屬性會被隱藏 * * @var array */ protected $hidden = ['password']; } 注意:隱藏關(guān)聯(lián)時,需使...

http://www.o2fo.com/laravel_8/laravel_8-nas13i9a.html

4284.Laravel 8 追加 JSON 值

...應(yīng)屬性。要實現(xiàn)這個功能,首先要定義一個 修改器。<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class User extends Model { /** * Get the administrator flag for the user. * * @return bool */ public function getIsAdminAttribute() { return $this->attribut...

http://www.o2fo.com/laravel_8/laravel_8-5wxl3i9c.html

4285.Laravel 8 Artisan 測試運行器

phpunit 命令之外, 您還可以使用 Artisan 的 test 命令來運行你的測試。Artisan 測試運行器提供了關(guān)于當(dāng)前正在運行的測試的更多信息,以便于日常開發(fā)與調(diào)試:php artisan test 任何可以傳遞給 phpunit 命令的參數(shù)也可以傳遞給 Artisan ...

http://www.o2fo.com/laravel_8/laravel_8-cqrn3i9m.html

4286.Laravel 8 Session / 身份驗證

...的測試請求發(fā)送之前,就會先去給數(shù)據(jù)加載 session:<?php class ExampleTest extends TestCase { public function testApplication() { $response = $this->withSession(['foo' => 'bar']) ->get('/'); } } 當(dāng)然,一般使用 session 時都是用于維護(hù)...

http://www.o2fo.com/laravel_8/laravel_8-8phr3i9t.html

4287.Laravel 8 創(chuàng)建工廠

...每列的值。要創(chuàng)建工廠,請使用 make:factory Artisan 命令:php artisan make:factory PostFactory 新工廠將放置在您的 database/factories 目錄中。--model 選項可用于指示工廠創(chuàng)建的模型的名稱。 此選項將使用給定的模型預(yù)先填充生成的工廠文件...

http://www.o2fo.com/laravel_8/laravel_8-jvq23ifg.html

4288.Laravel 8 Facades

...擬對 Laravel Facade 的調(diào)用。比如下面控制器中的行為:<?php namespace App\Http\Controllers; use Illuminate\Support\Facades\Cache; class UserController extends Controller { /** * 顯示該應(yīng)用程序的所有用戶的列表. * * @return Response */ public function index() { $value...

http://www.o2fo.com/laravel_8/laravel_8-6p783igg.html

4289.Laravel 8 升級 Horizon

...升級到新的 Horizon 版本時,你應(yīng)該重新發(fā)布 Horizon 資源:php artisan horizon:publish 為了使資源文件保持最新并避免以后的更新中出現(xiàn)問題,你可以將以下命令添加到 composer.json 文件中的 post-update-cmd 腳本中:{ "scripts": { "post-update-cmd"...

http://www.o2fo.com/laravel_8/laravel_8-i7zc3ih9.html

4290.Laravel 8 UUID 的客戶端

...ient 的主鍵,而不是使用自動遞增的整數(shù)作為主鍵。執(zhí)行 php artisan passport:install --uuids 后,您將得到關(guān)于禁用 Passport 默認(rèn)遷移的相關(guān)指令說明:php artisan passport:install --uuids

http://www.o2fo.com/laravel_8/laravel_8-uhmc3ihp.html

抱歉,暫時沒有相關(guān)的文章

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

熱門課程