Shift with red gradient lettering

Form Request array syntax

Laravel

Convert pipe (|) delimited validation rules from strings into an array of validation rules while using Laravel Rule objects where available.

Before

'email' => 'required|string|email|max:255|unique:users',

After

'email' => [
'required',
'string',
'email',
'max:255',
Rule::unique('users'),
],

← Back to the Workbench Tasks

Sign in with any of the following services to connect Shift with your Laravel project.


Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.