add some more functions
This commit is contained in:
1 parent
a3d41770e7
commit
f94bac983e
8 files changed
+130
-21
No files matched your search
@@ -4,6 +4,7 @@
|
||||
|
||||
use App\Models\Branch\Branch;
|
||||
use App\Models\System\Location\Province;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -93,4 +94,20 @@ public function workProvince(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Province::class, 'province_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* User (who created order)
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* User who revieved order
|
||||
*/
|
||||
public function filledBy(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'filled_by');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user