DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Morcos Gad
Morcos Gad

Posted on

Laravel 8.70 Released ( can() - date_format )

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');
Enter fullscreen mode Exit fullscreen mode

Validation component updates
Now accepts multiple date formats separated by a comma

$request->validate([
  'date' => ['date_format:y-m-d,m-d']
]);
Enter fullscreen mode Exit fullscreen mode

I hope you enjoy the code.

Top comments (0)

Update Your DEV Experience Level:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. πŸ›