This repository has been archived on 2025-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
Files

72 lines
2.1 KiB
PHP
Raw Permalink Normal View History

2024-07-04 16:57:26 +05:30
<?php
namespace App\Models\Frontend;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Admin\country;
use App\Models\Admin\program;
use App\Models\Frontend\volunteer_profile_document;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Models\Frontend\payment_transaction_master;
class User extends Authenticatable
{
use HasFactory;
protected $table = 'iam_principal';
public function paymentTransactions()
{
return $this->hasMany(payment_transaction_master::class,'principal_xid');
}
public function user_documents()
{
return $this->hasMany(volunteer_profile_document::class,'principal_xid');
}
public function country()
{
return $this->belongsTo(country::class,'id');
}
public function get_single_country()
{
return $this->hasOne(country::class,'id');
}
public function get_sngle_program()
{
return $this->hasOne(program::class,'id');
}
protected $guarded = ['id',
'first_name',
'last_name',
'email',
'email_verified_at',
'password',
'programs_xid',
'country_xid',
'start_date',
'duration',
'phone_number',
'gender',
'date_of_birth',
'address_line1',
'city',
'country',
'state',
'post_code',
'lang_level',
'hear_about_us',
'motivation_to_join_program',
'any_comment',
'created_at',
'updated_at'];
}