After logging the user into the system I theoretically would have to have some protected routes, how do I do this? In my case it is returning error. See:
routes.php
Route::group(['before' => 'auth'],function(){
Route::controller('reserva','ReservaController');
});
Error:
ErrorException
call_user_func_array() expects parameter 1 to be a valid callback, class'Illuminate\Auth\Guard' does not have a method 'ClienteContato'
For disengagement, my model.
ClientContact.php
<?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
class ClienteContato extends Eloquent implements UserInterface, RemindableInterface {
public function __construct(){
parent::__construct();
}
use UserTrait, RemindableTrait;
protected $table = 'cliente_contato';
protected $primaryKey = 'id_contato';
protected $hidden = array('password', 'remember_token');
protected $fillable = [...];
public static $rules = [];
public $timestamps = false;
public function getAuthIdentifier(){
return $this->getKey();
}
public function getAuthPassword(){
return $this->password;
}
}