Files
vedant-chavan/app/Models/NotificationUser.php

32 lines
739 B
PHP
Raw Permalink Normal View History

2024-06-12 20:29:05 +05:30
<?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');
}
}