<?php
namespace QxCMS\Modules\Client\Models\Settings\LoginLogs;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
class LoginLogs extends Model
{
protected $connection = 'client';
protected $table = 'login_logs';
protected $fillable = [
'name',
'username',
'ipaddress'
];
protected $guarded = [];
protected $appends = ['hashid'];
/*
* Model Accessors
*/
public function getHashidAttribute()
{
return hashid($this->id);
}
public function getCreatedAtAttribute($value)
{
return Carbon::parse($value)->format('M d, Y h:i A');
}
}