66 lines
1.3 KiB
PHP
66 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class UserDetail extends Model
|
|
{
|
|
// use SoftDeletes;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'user_id',
|
|
'jati_id',
|
|
'profession',
|
|
'profession_speciality',
|
|
'location',
|
|
'longitude',
|
|
'latitude',
|
|
'native_place',
|
|
'native_longitude',
|
|
'native_latitude',
|
|
'mother_tongue_privacy',
|
|
'jati_privacy',
|
|
'marital_status_privacy',
|
|
'marriage_anniversary_privacy',
|
|
'location_privacy',
|
|
'native_place_privacy',
|
|
'mother_tongue_id',
|
|
'blood_group_id',
|
|
'marital_status',
|
|
'marriage_anniversary',
|
|
'blood_group_privacy',
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be cast to native types.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $casts = [
|
|
'id' => 'integer',
|
|
'user_id' => 'integer',
|
|
'jati_id' => 'integer',
|
|
'gender' => 'integer',
|
|
];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(\App\Models\User::class);
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function jati()
|
|
{
|
|
return $this->belongsTo(Jati::class,'jati_id', 'id');
|
|
}
|
|
}
|