Add Remove User Insurance
This commit is contained in:
@@ -44,4 +44,9 @@ class User extends Model
|
||||
{
|
||||
return $this->hasOne(UserDetail::class, 'nIDUser', 'nID');
|
||||
}
|
||||
|
||||
public function insurances()
|
||||
{
|
||||
return $this->hasMany(UserInsurance::class, 'nIDUser', 'nID');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,17 @@ namespace App\Models\OLDLMS;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class UserInsurance extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
const CREATED_AT = 'dCreateOn';
|
||||
const UPDATED_AT = 'dUpdateOn';
|
||||
const DELETED_AT = 'dDeleteOn';
|
||||
|
||||
protected $connection = 'oldlms';
|
||||
|
||||
protected $table = 'tm_users_insurance';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user