for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Uccello\Core\Models;
use Uccello\Core\Database\Eloquent\Model;
class UserSettings extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'user_settings';
* The primary key for the model.
protected $primaryKey = 'user_id';
* The attributes that are mass assignable.
* @var array
protected $fillable = [
'user_id',
'data',
];
* The attributes that should be casted to native types.
protected $casts = [
'data' => 'object',
protected function initTablePrefix()
$this->tablePrefix = env('UCCELLO_TABLE_PREFIX', 'uccello_');
env
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$this->tablePrefix = /** @scrutinizer ignore-call */ env('UCCELLO_TABLE_PREFIX', 'uccello_');
}
public function user()
return $this->belongsTo(User::class);