Skip to content

Commit

Permalink
Removed the NoAttributesToSelectSpecifiedException (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jade-GG authored Aug 16, 2024
1 parent 77cc081 commit 1f6e2a0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
13 changes: 0 additions & 13 deletions src/Exceptions/NoAttributesToSelectSpecifiedException.php

This file was deleted.

3 changes: 1 addition & 2 deletions src/Models/Scopes/Product/WithProductAttributesScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
use Rapidez\Core\Exceptions\NoAttributesToSelectSpecifiedException;

class WithProductAttributesScope implements Scope
{
public function apply(Builder $builder, Model $model)
{
if (empty($model->attributesToSelect)) {
throw NoAttributesToSelectSpecifiedException::create();
return;
}

$attributeModel = config('rapidez.models.attribute');
Expand Down

0 comments on commit 1f6e2a0

Please sign in to comment.