for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Xetaravel\Models;
class UserLog extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'user_log';
* The attributes that are mass assignable.
* @var array
protected $fillable = [
'user_id',
'steam_id',
'loggable_id',
'loggable_type',
'event_type',
'data'
];
* The attributes that should be cast to native types.
protected $casts = [
'data' => 'array'
* Get the user that owns the log.
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
public function user()
return $this->belongsTo(User::class);
}
* Get the loggable relation.
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
public function loggable()
return $this->morphTo();