28 lines
587 B
PHP
28 lines
587 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class request extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'nama', 'handphone', 'email', 'nik', 'kategori', 'tujuan', 'status', 'keterangan', 'created_by_id', 'operation_id',
|
|
];
|
|
|
|
protected $nullable = ['operation_id'];
|
|
|
|
public function operation()
|
|
{
|
|
return $this->belongsTo(Operation::class);
|
|
}
|
|
|
|
public function createdBy()
|
|
{
|
|
return $this->belongsTo(User::class, 'created_by_id');
|
|
}
|
|
}
|