lundi 26 octobre 2015

return view() doesn't work in laravel 5

Im getting Use of undefined constant dashboard - assumed 'dashboard' after

public function login()
    {
        $email = Input::get('email');
        $password = Input::get('password');

        if (Auth::attempt(['email' => $email, 'password' => $password]))
        {
            return view(dashboard);
        }
        else
            return 'nope';

    }

It was working when in my subscriber model i had Class Subscriber extends Model

but after changing that to class Subscriber extends \Eloquent implements Authenticatable returning view() in controller no longer works.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire