26 lines
465 B
PHP
26 lines
465 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Notifikasi extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'notifikasi';
|
|
protected $guarded = [];
|
|
|
|
|
|
public function barang()
|
|
{
|
|
return $this->belongsTo(Barang::class, 'barang_id', 'id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id', 'id');
|
|
}
|
|
}
|