-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
It might be good to create Marco (response and request)
Ref: https://laravel.com/docs/7.x/responses#response-macros
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\ServiceProvider;
class ResponseMacroServiceProvider extends ServiceProvider
{
/**
* Register the application's response macros.
*
* @return void
*/
public function boot()
{
Response::macro('caps', function ($value) {
return Response::make(strtoupper($value));
});
}
}
Metadata
Metadata
Assignees
Labels
No labels