32 lines
739 B
PHP
32 lines
739 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use App\Models\User;
|
|
use App\Models\NotificationMaster;
|
|
// use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class NotificationUser extends Model
|
|
{
|
|
use HasFactory;
|
|
// use SoftDeletes;
|
|
// protected $dates = ['deleted_at'];
|
|
protected $table = 'notification_users';
|
|
protected $fillable = [
|
|
'user_id',
|
|
'notification_id'
|
|
];
|
|
|
|
public function user_data()
|
|
{
|
|
return $this->hasOne(User::class,'id','user_id');
|
|
}
|
|
|
|
public function notification_master_data(){
|
|
|
|
return $this->hasOne(NotificationMaster::class,'id','notification_id');
|
|
}
|
|
}
|