One Hat Cyber Team
Your IP :
3.144.231.11
Server IP :
104.21.112.1
Server :
Linux agrigation-prod 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64
Server Software :
nginx/1.24.0
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
forge
/
staging.gftag.com
/
app
/
Models
/
View File Name :
Adjustment.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use App\Services\OrganisationService; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasOne; class Adjustment extends Model { use HasFactory; protected $fillable = ['organisation_id', 'adjustment_number', 'item_id', 'quantity','adjustment_date', 'adjustment_type', 'status', 'comments']; public function item(): BelongsTo { return $this->BelongsTo(Item::class); } public function transactions() { return $this->morphMany('App\Models\Transaction', 'transactionable'); } public function getLastAdjustmentNumber(){ $organisationService = new OrganisationService(); $org_id = $organisationService->getOrganisationByUser(); $adjustment = Adjustment::where('organisation_id', $org_id)->orderBy('id', 'desc')->first(); return $adjustment; } }