initial commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user