mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
list companies without confirmed payments
This commit is contained in:
@@ -12,6 +12,9 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Collection;
|
||||
use Staudenmeir\EloquentHasManyDeep\HasManyDeep;
|
||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||
|
||||
|
||||
/**
|
||||
* Class Company
|
||||
@@ -27,6 +30,7 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class Company extends AbstractModel implements Documentable
|
||||
{
|
||||
use HasRelationships;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'companies';
|
||||
@@ -90,6 +94,14 @@ class Company extends AbstractModel implements Documentable
|
||||
return $this->HasMany(Booking::class, 'company_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return hasManyDeep
|
||||
*/
|
||||
public function transactions(): hasManyDeep
|
||||
{
|
||||
return $this->hasManyDeep(Transaction::class, [Booking::class], ['company_id', 'booking_id'], ['id', 'id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Builder
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user