App下載

詞條

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

5311.Laravel 8 獲取緩存實(shí)例

...aravel 緩存契約底層的實(shí)現(xiàn)提供了方便又簡(jiǎn)潔的方法:<?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-chwt3has.html

5312.Laravel 8 編寫(xiě)驅(qū)動(dòng)

...act 契約。因此, MongoDB 緩存實(shí)現(xiàn)看起來(lái)就像是這樣:<?php namespace App\Extensions; use Illuminate\Contracts\Cache\Store; class MongoStore implements Store { public function get($key) {} public function many(array $keys) {} public function put($key, $value, $seconds) {} public f...

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

5313.Laravel 8 diff() {#collection-method}

diff 方法將集合與其它集合或者 PHP 數(shù)組進(jìn)行值的比較。然后返回原集合中存在而指定集合中不存在的值:$collection = collect([1, 2, 3, 4, 5]); $diff = $collection->diff([2, 4, 6, 8]); $diff->all(); // [1, 3, 5] 技巧:這個(gè)方法的行為當(dāng)使用 Eloquen...

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

5314.Laravel 8 diffAssoc() {#collection-method}

diffAssoc 方法與另外一個(gè)集合或基于 PHP 數(shù)組的鍵 / 值對(duì)進(jìn)行比較。這個(gè)方法將會(huì)返回原集合不存在于指定集合的鍵 / 值對(duì): $collection = collect([ 'color' => 'orange', 'type' => 'fruit', 'remain' => 6, ]); $diff...

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

5315.Laravel 8 diffKeys() {#collection-method}

diffKeys 方法和另外一個(gè)集合或 PHP 數(shù)組的鍵(keys)進(jìn)行比較,然后返回原集合中存在而指定集合中不存在鍵所對(duì)應(yīng)的鍵 / 值對(duì):$collection = collect([ 'one' => 10, 'two' => 20, 'three' => 30, 'four' => 40, 'five...

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

5316.Laravel 8 pad() {#collection-method}

...組,直到數(shù)組達(dá)到指定的大小。該方法的行為與 array_pad PHP 函數(shù)功能類似。 要填充到左側(cè),你應(yīng)該使用負(fù)值。如果給定大小的絕對(duì)值小于或等于數(shù)組的長(zhǎng)度,則不會(huì)發(fā)生填充:$collection = collect(['A', 'B', 'C']); $fil...

http://www.o2fo.com/laravel_8/laravel_8-1nzl3he4.html

5317.Laravel 8 partition() {#collection-method}

partition 是可以和 PHP 的 list 方法配合使用,利用回調(diào)返回是否為真來(lái)分開(kāi)通過(guò)指定條件的元素以及那些不通過(guò)指定條件的元素:$collection = collect([1, 2, 3, 4, 5, 6]); list($underThree, $equalOrAboveThree) = $collection->partition(function ($i) { return ...

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

5318.Laravel 8 sort() {#collection-method}

...,可以通過(guò)自己的算法將回調(diào)函數(shù)傳遞到 sort 。請(qǐng)參閱 PHP 文檔的 uasort,這是集合的 sort 方法在底層所調(diào)用的。 技巧:如果你需要對(duì)嵌套數(shù)組或?qū)ο筮M(jìn)行排序,請(qǐng)參照 sortBy 和 sortByDesc 方法。

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

5319.Laravel 8 toArray() {#collection-method}

toArray 方法將集合轉(zhuǎn)換成 PHP array。如果集合的值是 Eloquent 模型,那也會(huì)被轉(zhuǎn)換成數(shù)組:$collection = collect(['name' => 'Desk', 'price' => 200]); $collection->toArray(); /* [ ['name' => 'Desk', 'price' => 200]...

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

5320.Laravel 8 創(chuàng)建懶集合

要?jiǎng)?chuàng)建一個(gè)懶集合實(shí)例,你應(yīng)該將 PHP 生成器函數(shù)傳遞給懶集合的 make 方法:use Illuminate\Support\LazyCollection; LazyCollection::make(function () { $handle = fopen('log.txt', 'r'); while (($line = fgets($handle)) !== false) { yield $line; } });Copy

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

抱歉,暫時(shí)沒(méi)有相關(guān)的微課

w3cschool 建議您:

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

抱歉,暫時(shí)沒(méi)有相關(guān)的視頻課程

w3cschool 建議您:

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

抱歉,暫時(shí)沒(méi)有相關(guān)的教程

w3cschool 建議您:

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

5311.Laravel 8 獲取緩存實(shí)例

...aravel 緩存契約底層的實(shí)現(xiàn)提供了方便又簡(jiǎn)潔的方法:<?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-chwt3has.html

5312.Laravel 8 編寫(xiě)驅(qū)動(dòng)

...act 契約。因此, MongoDB 緩存實(shí)現(xiàn)看起來(lái)就像是這樣:<?php namespace App\Extensions; use Illuminate\Contracts\Cache\Store; class MongoStore implements Store { public function get($key) {} public function many(array $keys) {} public function put($key, $value, $seconds) {} public f...

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

5313.Laravel 8 diff() {#collection-method}

diff 方法將集合與其它集合或者 PHP 數(shù)組進(jìn)行值的比較。然后返回原集合中存在而指定集合中不存在的值:$collection = collect([1, 2, 3, 4, 5]); $diff = $collection->diff([2, 4, 6, 8]); $diff->all(); // [1, 3, 5] 技巧:這個(gè)方法的行為當(dāng)使用 Eloquen...

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

5314.Laravel 8 diffAssoc() {#collection-method}

diffAssoc 方法與另外一個(gè)集合或基于 PHP 數(shù)組的鍵 / 值對(duì)進(jìn)行比較。這個(gè)方法將會(huì)返回原集合不存在于指定集合的鍵 / 值對(duì): $collection = collect([ 'color' => 'orange', 'type' => 'fruit', 'remain' => 6, ]); $diff...

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

5315.Laravel 8 diffKeys() {#collection-method}

diffKeys 方法和另外一個(gè)集合或 PHP 數(shù)組的鍵(keys)進(jìn)行比較,然后返回原集合中存在而指定集合中不存在鍵所對(duì)應(yīng)的鍵 / 值對(duì):$collection = collect([ 'one' => 10, 'two' => 20, 'three' => 30, 'four' => 40, 'five...

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

5316.Laravel 8 pad() {#collection-method}

...組,直到數(shù)組達(dá)到指定的大小。該方法的行為與 array_pad PHP 函數(shù)功能類似。 要填充到左側(cè),你應(yīng)該使用負(fù)值。如果給定大小的絕對(duì)值小于或等于數(shù)組的長(zhǎng)度,則不會(huì)發(fā)生填充:$collection = collect(['A', 'B', 'C']); $fil...

http://www.o2fo.com/laravel_8/laravel_8-1nzl3he4.html

5317.Laravel 8 partition() {#collection-method}

partition 是可以和 PHP 的 list 方法配合使用,利用回調(diào)返回是否為真來(lái)分開(kāi)通過(guò)指定條件的元素以及那些不通過(guò)指定條件的元素:$collection = collect([1, 2, 3, 4, 5, 6]); list($underThree, $equalOrAboveThree) = $collection->partition(function ($i) { return ...

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

5318.Laravel 8 sort() {#collection-method}

...,可以通過(guò)自己的算法將回調(diào)函數(shù)傳遞到 sort 。請(qǐng)參閱 PHP 文檔的 uasort,這是集合的 sort 方法在底層所調(diào)用的。 技巧:如果你需要對(duì)嵌套數(shù)組或?qū)ο筮M(jìn)行排序,請(qǐng)參照 sortBy 和 sortByDesc 方法。

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

5319.Laravel 8 toArray() {#collection-method}

toArray 方法將集合轉(zhuǎn)換成 PHP array。如果集合的值是 Eloquent 模型,那也會(huì)被轉(zhuǎn)換成數(shù)組:$collection = collect(['name' => 'Desk', 'price' => 200]); $collection->toArray(); /* [ ['name' => 'Desk', 'price' => 200]...

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

5320.Laravel 8 創(chuàng)建懶集合

要?jiǎng)?chuàng)建一個(gè)懶集合實(shí)例,你應(yīng)該將 PHP 生成器函數(shù)傳遞給懶集合的 make 方法:use Illuminate\Support\LazyCollection; LazyCollection::make(function () { $handle = fopen('log.txt', 'r'); while (($line = fgets($handle)) !== false) { yield $line; } });Copy

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

抱歉,暫時(shí)沒(méi)有相關(guān)的文章

w3cschool 建議您:

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

熱門(mén)課程