6
In my model User, left my protected $table = 'usuarios'
and in auth.php the same thing, but when calling the method save()
of the Eloquent, he recognizes the table 'users' and not 'users' as I urged.
So I renamed in my Mysql table the table 'users' for 'users' again, only for testing, from that he recognized the table, but the return of the save()
was always bool = false
I decided to do one more test by changing the header of my model User of
class User extends ConfideUser implements PresentableInterface {
for
class User extends Eloquent implements PresentableInterface {
and amazingly, it started working again. My renamed tables worked and the save()
started working too.
What could be going on? I can’t leave it that way because I need the class Confide 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',
...
I left my Model exactly as described above and the same problem persists. I tried to search to find if there are any classes overwriting her, but found nothing.
– tiaguinhow
in conversation with Zizaco, the same informed me that the conflict may be in the dependencies of Ardent.
– tiaguinhow
Zizaco updated his confidence to not depend on Ardent, but I’m still having trouble saving. If I do a search, it returns the result of the table 'users' normally, but if I use the command save() or updateUniques(), it tries to save in the tables 'users'... you know what may be happening ?
– tiaguinhow