| Server IP : 77.68.25.176 / Your IP : 216.73.216.25 Web Server : Apache System : Linux plesk 4.15.0-159-generic #167-Ubuntu SMP Tue Sep 21 08:55:05 UTC 2021 x86_64 User : dwp ( 10001) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/dazzlingwebplanet.co.uk/tap2teach.dazzlingwebplanet.com/app/Models/ |
Upload File : |
<?php
namespace App\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory;
/**
* Class UserDetail
* @package App\Models
* @version April 2, 2021, 9:09 am UTC
*
* @property integer $user_id
* @property string $title
* @property string $first_name
* @property string $last_name
* @property string $date_of_birth
* @property string $contact_number
* @property string $country_code
* @property integer $user_type
* @property boolean $status
*/
class UserDetail extends Model
{
use SoftDeletes;
use HasFactory;
public $table = 'user_details';
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
protected $dates = ['deleted_at'];
public $fillable = [
'user_id',
'avatar',
'title',
'first_name',
'last_name',
'date_of_birth',
'contact_number',
'country_code',
'user_type',
'status',
'stripe_customer_id',
'is_parent'
];
/**
* The attributes that should be casted to native types.
*
* @var array
*/
protected $casts = [
'id' => 'integer',
'user_id' => 'integer',
'title' => 'string',
'avatar' => 'string',
'first_name' => 'string',
'last_name' => 'string',
'date_of_birth' => 'date',
'contact_number' => 'string',
'country_code' => 'string',
'user_type' => 'integer',
'status' => 'boolean',
'stripe_customer_id' => 'string',
'is_parent' => 'boolean'
];
/**
* Validation rules
*
* @var array
*/
public static $rules = [
'user_id' => 'required|integer',
'title' => 'required|string',
'first_name' => 'required|string|max:100',
'last_name' => 'required|string|max:100',
'date_of_birth' => 'required',
'contact_number' => 'nullable|string|max:15',
'country_code' => 'nullable|string|max:10',
'user_type' => 'required|integer',
'status' => 'required|boolean',
'stripe_customer_id' => 'nullable|string',
'deleted_at' => 'nullable',
'created_at' => 'nullable',
'updated_at' => 'nullable',
'avatar' => 'nullable'
];
}