This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Transaction extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'cabang_id', 'budget_control_id', 'transaction_date', 'reference_number',
|
||||
'description', 'amount', 'type', 'category', 'periode_month',
|
||||
'periode_year', 'created_by'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'transaction_date' => 'date',
|
||||
'amount' => 'decimal:2',
|
||||
];
|
||||
|
||||
public function cabang() {
|
||||
return $this->belongsTo(Cabang::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user