for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class LogEntry extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'log';
* Indicates if the model should be timestamped.
* @var bool
public $timestamps = false;
* The attributes that should be cast to native types.
* @var array
protected $casts = [
'time' => 'datetime',
'context' => 'array',
];
* The attributes that are mass assignable.
protected $fillable = [
'channel',
'message',
'level',
'level_name',
'context',
'file',
'line',
'time',
public function getLinesAttribute()
return explode(PHP_EOL, $this->message);
}