Add some changes

This commit is contained in:
2023-12-11 18:31:43 +05:00
parent 2eba88c7b1
commit 9ea3e71456
8 changed files with 65 additions and 42 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Models\Order\Loan;
use App\Models\Branch\Branch;
use App\Models\System\Location\Province;
use App\Models\User;
use App\Repos\Order\Loan\LoanOrderRepo;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
@@ -103,4 +104,15 @@ class LoanOrder extends Model
{
return $this->belongsTo(User::class, 'user_id');
}
/**
* "boot" method for model
*/
protected static function boot()
{
parent::boot();
static::creating(LoanOrderRepo::creating());
static::created(LoanOrderRepo::created());
}
}