'int', 'model_id' => 'int', 'level' => 'int' ]; protected $fillable = [ 'user_id', 'model_id', 'model', 'action', 'channel', 'message', 'level' ]; public $levelTypes = [ 1 => 'debug', 2 => 'info', 3 => 'notice', 4 => 'warning', 5 => 'error', 6 => 'critical', 7 => 'alert', ]; public function user() { return $this->belongsTo(User::class); } public function getLevelType(){ return isset($this->levelTypes[$this->level]) ? $this->levelTypes[$this->level] : ""; } }