Skip to content

Commit

Permalink
45. fix product collection property
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrakovich committed Oct 8, 2024
1 parent 0504e67 commit 08ef9b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/Admin/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* @property mixed $photos
*
* @property-read \App\Models\Category|null $category
* @property-read \App\Models\Collection|null $collection
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Size[] $sizes
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Color[] $colors
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Fabric[] $fabrics
Expand Down
4 changes: 3 additions & 1 deletion src/app/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use App\Enums\Product\ProductLabels;
use App\Facades\Currency;
use App\Models\Collection as ProductCollection;
use App\Models\OneC\Product as ProductFromOneC;
use App\Services\SearchService;
use App\Traits\ProductSales;
Expand Down Expand Up @@ -49,6 +50,7 @@
* @property int|null $country_of_origin_id
*
* @property-read \App\Models\Category|null $category
* @property-read \App\Models\Collection|null $collection
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Size[] $sizes
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Color[] $colors
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Fabric[] $fabrics
Expand Down Expand Up @@ -114,7 +116,7 @@ public function category(): Relations\BelongsTo
*/
public function collection(): Relations\BelongsTo
{
return $this->belongsTo(Collection::class);
return $this->belongsTo(ProductCollection::class);
}

/**
Expand Down

0 comments on commit 08ef9b3

Please sign in to comment.