Files
api-extranetwork/app/Models/User.php
ExtraNetwork e5c4b6aa13 first commit
2026-05-12 17:04:54 +03:00

45 lines
1017 B
PHP

<?php
namespace App\Models;
use Illuminate\Auth\Authenticatable;
use Laravel\Lumen\Auth\Authorizable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
class User extends BaseModel implements AuthenticatableContract, AuthorizableContract
{
use Authenticatable, Authorizable;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'user';
protected $appends = ['nameSurname'];
protected $fillable = [];
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
protected $dateFormat = 'U';
protected $guarded = [];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = [
'password',
];
public function getNameSurnameAttribute()
{
return $this->name . ' ' . $this->surname;
}
}