In my User model, I left my protected $table = 'usuarios'
and in auth.php the same thing, but when calling the save()
method of Eloquent, it recognizes table ' users ' and not ' users ' as I instantiated.
So, I renamed the table ' users ' to ' users ' again, just for testing, from which he recognized the table, but the return of save()
was always bool = false
I decided to do another test by changing the header of my User model from
class User extends ConfideUser implements PresentableInterface {
for
class User extends Eloquent implements PresentableInterface {
And incredible as it may seem, it's back up and running normally. My renamed tables worked and save()
started working too.
What can be happening? I can not leave it that way because I need the Confide class in my project.
I created a simple test-only route:
Route::get('teste', function(){
$user = User::find(3);
$user->background = 'teste';
dd($user->save());
});
My Model User:
<?php
use Zizaco\Confide\ConfideUser;
use Zizaco\Confide\Confide;
use Zizaco\Confide\ConfideEloquentRepository;
use Zizaco\Entrust\HasRole;
use Robbo\Presenter\PresentableInterface;
use Carbon\Carbon;
class User extends ConfideUser implements PresentableInterface {
use HasRole;
public function getPresenter()
{
return new UserPresenter($this);
}
...
My auth.php file:
<?php
return array(
'driver' => 'eloquent',
'model' => 'User',
'table' => 'users',
...