Laravel 11.12版本發(fā)布 - Artisan的`make`命令自動(dòng)剪切`.php `擴(kuò)展
Laravel  /  管理員 發(fā)布于 8個(gè)月前   532
本周,Laravel團(tuán)隊(duì)發(fā)布了v11.12,其中包括一個(gè)乘法收集方法,
在make命令中自動(dòng)截?cái)?php擴(kuò)展名等等。
傳遞命令時(shí)剪切PHP擴(kuò)展(v11.11.1)
Jason McCreary在傳遞.php來生成用于控制器、事件、命令等的文件的:
*命令時(shí),貢獻(xiàn)了一個(gè)很好的DX功能。
除了Laravel現(xiàn)在在幕后處理.php擴(kuò)展名外,沒有什么變化:
php artisan make:controller UserController.php
# Before - app/Http/Controllers/UserController.php.php
# After - app/Http/Controllers/UserController.php
當(dāng)你不小心這樣做時(shí)會(huì)很痛苦,因?yàn)槟惚仨氁苿?dòng)文件或刪除文件并重新創(chuàng)建所有內(nèi)容。
目前尚不清楚該命令是否會(huì)在鍵入時(shí)切斷擴(kuò)展名,
所以這對(duì)一些隱藏的痛苦來說是一個(gè)很好的解決辦法——至少對(duì)我來說是這樣;)
將multiply()方法添加到集合中
https://www.youtube.com/embed/AWvXjUnUdw8
Patrick O'Meara為集合貢獻(xiàn)了一個(gè)multiply()方法,該方法將集合中的項(xiàng)目相乘。
它的工作原理是將集合上的現(xiàn)有值乘以x次:
$c = collect([
['name' => 'User #1', 'email' => '[email protected]'],
['name' => 'User #2', 'email' => '[email protected]'],
])->multiply(2);
調(diào)用multiply(2)后,上面的集合看起來如下:
向事件服務(wù)提供程序添加事件發(fā)現(xiàn)路徑
@如果需要?jiǎng)討B(tài)添加其他事件發(fā)現(xiàn)路徑,Jascha向事件服務(wù)提供程序提供了
一個(gè)addEventDiscoveryPaths()方法。
通常不需要此功能,但您可以通過以下方式實(shí)現(xiàn):
use Illuminate\Foundation\Support\Providers\EventServiceProvider;
EventServiceProvider::addEventDiscoveryPaths('/some/path/to/events');
EventServiceProvider::addEventDiscoveryPaths([
'/some/path',
'/another/path'
]);
發(fā)布說明
您可以在下面看到新功能和更新的完整列表,以及GitHub上11.11.0和11.12.0之間的差異。
以下發(fā)行說明直接來自變更日志:
https://github.com/laravel/framework/compare/v11.11.0...v11.12.0
https://github.com/laravel/framework/blob/72c872e4883644947a10680e87a8b89cb65f84f1/CHANGELOG.md#v11120---2024-06-25
11.12.0
[10.x]修復(fù)@zds-s在createSesTransport方法返回注釋中的拼寫錯(cuò)誤https://github.com/laravel/framework/pull/51688
[10.x]修復(fù)@faissaloux在https://github.com/laravel/framework/pull/51686
[10.x]在中通過@faissaloux將Enumerable unless()$回調(diào)參數(shù)設(shè)置為可選https://github.com/laravel/framework/pull/51701
由@taylorotwell在中還原“[10.x]將Enumerable unless()$回調(diào)參數(shù)設(shè)為可選”https://github.com/laravel/framework/pull/51707
[10.x]修復(fù)了在中@crynobone無法將另一個(gè)命令作為command類的初始化實(shí)例調(diào)用的問題https://github.com/laravel/framework/pull/51824
[10.x]修復(fù)了@Treggats在中對(duì)空集合的句柄shift()https://github.com/laravel/framework/pull/51841
[10.x]確保模式:只有當(dāng)遷移表由@NickSdot在https://github.com/laravel/framework/pull/51827
[11.x]@crynobone在測(cè)試中的改進(jìn)https://github.com/laravel/framework/pull/51847
[11.x]在中使用@seriquynh測(cè)試應(yīng)用程序存儲(chǔ)路徑https://github.com/laravel/framework/pull/51848
[11.x]通過@joshuaruesweg修復(fù)PHP_MAXPATHLEN對(duì)比PHP_MAXPACHLEN稍小的字符串的檢查https://github.com/laravel/framework/pull/51850
[11.x]改進(jìn)@macbookandrew在https://github.com/laravel/framework/pull/51846
[11.x]通過@chu121su12更新錯(cuò)誤頁面以顯示GEThttps://github.com/laravel/framework/pull/51837
[11.x]通過@osbre在異常呈現(xiàn)器中刪除棄用的類型屬性https://github.com/laravel/framework/pull/51866
[11.x]通過@osbre在異常模板中導(dǎo)入類https://github.com/laravel/framework/pull/51863
[11.x]@bert-w在優(yōu)化前后的收集https://github.com/laravel/framework/pull/51876
[11.x]通過@patrickomeara將乘法添加到集合中https://github.com/laravel/framework/pull/51870
[11.x]通過@ya cha在EventServiceProvider中添加addEventDiscoveryPathshttps://github.com/laravel/framework/pull/51896
[11.x]通過@owenandrews修復(fù)翻譯為空或缺失時(shí)的驗(yàn)證屬性https://github.com/laravel/framework/pull/51890
[11.x]壯舉:通過@calebdw在tap()助手中添加泛型https://github.com/laravel/framework/pull/51881
v11.11.1
[11.x]通過@seriquynh刪除無用的變量賦值https://github.com/laravel/framework/pull/51838
[11.x]修復(fù)了@axlon在緩存存儲(chǔ)庫中鍵入事件調(diào)度器的問題https://github.com/laravel/framework/pull/51835
在@jasonmccreary中傳遞PHP擴(kuò)展名以生成命令時(shí),將其切碎https://github.com/laravel/framework/pull/51842
[11.x]通過@osbre在getNameInput中簡化.php擴(kuò)展的截?cái)鄅ttps://github.com/laravel/framework/pull/51843
[11.x]修復(fù):通過@calebdw在https://github.com/laravel/framework/pull/51845
還原“[11.x]更改afterCreation和afterMaking回調(diào)的范圍”,作者@driesvints inhttps://github.com/laravel/framework/pull/51858
轉(zhuǎn):
https://laravel-news.com/laravel-11-12-0
123 在
Clash for Windows作者刪庫跑路了,github已404中評(píng)論 按理說只要你在國內(nèi),所有的流量進(jìn)出都在監(jiān)控范圍內(nèi),不管你怎么隱藏也沒用,想搞你分..原梓番博客 在
在Laravel框架中使用模型Model分表最簡單的方法中評(píng)論 好久好久都沒看友情鏈接申請(qǐng)了,今天剛看,已經(jīng)添加。..博主 在
佛跳墻vpn軟件不會(huì)用?上不了網(wǎng)?佛跳墻vpn常見問題以及解決辦法中評(píng)論 @1111老鐵這個(gè)不行了,可以看看近期評(píng)論的其他文章..1111 在
佛跳墻vpn軟件不會(huì)用?上不了網(wǎng)?佛跳墻vpn常見問題以及解決辦法中評(píng)論 網(wǎng)站不能打開,博主百忙中能否發(fā)個(gè)APP下載鏈接,佛跳墻或極光..路人 在
php中使用hyperf框架調(diào)用訊飛星火大模型實(shí)現(xiàn)國內(nèi)版chatgpt功能示例中評(píng)論 教程很詳細(xì),如果加個(gè)前端chatgpt對(duì)話頁面就完美了..
Copyright·? 2019 侯體宗版權(quán)所有·
粵ICP備20027696號(hào)