birzha-legalizasia/app/Models/Client.php

69 lines
2.0 KiB
PHP
Raw Permalink Normal View History

2022-06-24 11:56:01 +00:00
<?php
namespace App\Models;
use Backpack\CRUD\app\Models\Traits\CrudTrait;
use Illuminate\Database\Eloquent\Model;
use Laravel\Sanctum\HasApiTokens;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Client extends Authenticatable
{
use CrudTrait;
use HasApiTokens, HasFactory, Notifiable;
/*
|--------------------------------------------------------------------------
| GLOBAL VARIABLES
|--------------------------------------------------------------------------
*/
protected $table = 'clients';
// protected $primaryKey = 'id';
// public $timestamps = false;
2022-08-09 10:12:46 +00:00
// protected $guarded = ['id'];
2022-06-24 11:56:01 +00:00
protected $fillable = [
2022-08-04 18:18:19 +00:00
'firstname', 'lastname', 'email', 'password', 'is_verified','verification_token', 'is_suspended', 'account_id'
2022-06-24 11:56:01 +00:00
];
protected $hidden = [
'password',
2022-07-07 14:19:10 +00:00
'token'
2022-06-24 11:56:01 +00:00
];
// protected $dates = [];
/*
|--------------------------------------------------------------------------
| FUNCTIONS
|--------------------------------------------------------------------------
*/
/*
|--------------------------------------------------------------------------
| RELATIONS
|--------------------------------------------------------------------------
*/
public function account(){
return $this->belongsTo(Account::class, 'account_id');
}
2022-06-24 11:56:01 +00:00
/*
|--------------------------------------------------------------------------
| SCOPES
|--------------------------------------------------------------------------
*/
/*
|--------------------------------------------------------------------------
| ACCESSORS
|--------------------------------------------------------------------------
*/
/*
|--------------------------------------------------------------------------
| MUTATORS
|--------------------------------------------------------------------------
*/
}