Add Compoships for multile key relationships, first implemented with Service::class
This commit is contained in:
@@ -15,6 +15,7 @@ use Leenooks\Traits\ScopeActive;
|
||||
use Leenooks\Traits\UserSwitch;
|
||||
|
||||
use App\Interfaces\IDs;
|
||||
use App\Models\Scopes\SiteScope;
|
||||
use App\Notifications\ResetPassword as ResetPasswordNotification;
|
||||
use App\Traits\{QueryCacheableConfig,SiteID};
|
||||
|
||||
@@ -412,6 +413,7 @@ class User extends Authenticatable implements IDs
|
||||
->groupBy(['invoice_id']);
|
||||
|
||||
$summary = (new Invoice)
|
||||
->withoutGlobalScope(SiteScope::class)
|
||||
->select([
|
||||
'invoice_id',
|
||||
DB::raw('SUM(discount) AS discount'),
|
||||
|
Reference in New Issue
Block a user