Hello I have created a view for users table. When I query it , It gives error General error: 1615 Prepared statement needs to be re-prepared
I have tried the solutions given in this forum i.e in config/database.php
PDO::ATTR_EMULATE_PREPARES => true
also tried to change
table_open_cache 128=>16384
table_definition_cache 1024=>16384
in mysql.cnf
I am using laravel 5.4 MariaDB version 10.1.26-MariaDB
My user model code is
class User extends SnipeModel implements AuthenticatableContract, CanResetPasswordContract
{
protected $presenter = 'App\Presenters\UserPresenter';
use SoftDeletes, ValidatingTrait;
use Authenticatable, Authorizable, CanResetPassword, HasApiTokens;
use UniqueUndeletedTrait;
use Notifiable;
use Presentable;
protected $dates = ['deleted_at'];
protected $hidden = ['password','remember_token','permissions','reset_password_code','persist_code'];
protected $table = 'users';
protected $injectUniqueIdentifier = true;
protected $fillable = [
'activated',
'address',
'city',
'company_id',
'country',
'department_id',
'email',
'employee_num',
'first_name',
'jobtitle',
'last_name',
'ldap_import',
'locale',
'location_id',
'manager_id',
'password',
'phone',
'state',
'username',
'zip',
];
protected $casts = [
'activated' => 'boolean',
];
What I have tried:
I have tried in config/database.php
PDO::ATTR_EMULATE_PREPARES => true
and
also tried to change
table_open_cache 128=>16384
table_definition_cache 1024=>16384