0
after logging in the user system I would theoretically have to have some protected routes, how do I do that? In my case is returning error. Look at:
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 the sake of conscience, my model.
Customerscontact.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;
}
}
Try to remove the
__contruct
of your model, or pass an array$attributes
:public function __construct(array $attributes = array() { parent::__construct($attributes); }
– gmsantos