Answers for "laravel make:request messages"

PHP
1

laravel make:request messages

public function rules()
{
    return [
        'title' => 'required|unique:posts|max:255',
        'body' => 'required',
    ];
}

public function messages()
{
    return [
        'title.required' => 'A title is required',
        'body.required' => 'A message is required',
    ];
}
Posted by: Guest on July-27-2021

Browse Popular Code Answers by Language