Let's get started quickly
Taylor Otwell contributed a can() method for route definitions as a convenience. The authorization via middleware documentation has an example of using this method:
// Using the middleware method
Route::put('/post/{post}', function (Post $post) {
// The current user may update the post...
})->middleware('can:update,post');
// Using the new can() method
Route::put('/post/{post}', function (Post $post) {
// The current user may update the post...
})->can('update', 'post');
Validation component updates
Now accepts multiple date formats separated by a comma
$request->validate([
'date' => ['date_format:y-m-d,m-d']
]);
I hope you enjoy the code.
Top comments (0)