Published in
Aug 1, 2024
# Chop PHP Extension When Passed to make Commands (v11.11.1)
11.12 開始,如果在 artisan command
時不小心多加了 PHP extension,會自動處理
php artisan make:controller UserController.php
# Before - app/Http/Controllers/UserController.php.php
# After - app/Http/Controllers/UserController.php
# Add multiply() Method to Collections
11.12 新增 Collection multiply()
method
# Add Event Discovery Paths to the Event Service Provider
11.12 新增 method,可以定義 event discover path
<?php
use Illuminate\Foundation\Support\Providers\EventServiceProvider;
EventServiceProvider::addEventDiscoveryPaths('/some/path/to/events');
EventServiceProvider::addEventDiscoveryPaths([
'/some/path',
'/another/path'
]);