jeudi 22 février 2018

Laravel 5.3 throws 500 error formrequest

I'm trying to upgrade 5.2 to 5.3 and I've made a request class in Laravel 5.3. Looks like this:

<?php namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class LoginFormRequest extends FormRequest
{
    // Check if the user is authorized to make this request.
    public function authorize()
    {
        // Here we can check for user-campaign mapping validation and return true or false. Also access level validation
        return true;
    }

    // Define all the validation rules that the form has to get validated.
    public function rules()
    {
        return [
            'email' => 'required|email|max:254',
            'password' => 'required|min:6|max:18',
            'remember_me' => ''
        ];
    }

}

But when I use that in my controller I receive:

500 internel server error

status without any response,

When I remove the rules in the request, Everything works fine. Anyone have any idea about this issue.?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire