restore composer.json, add mysqli extension
This commit is contained in:
23
app/Services/API/ProductService.php
Normal file
23
app/Services/API/ProductService.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\API;
|
||||
|
||||
class ProductService
|
||||
{
|
||||
public $product;
|
||||
public $instalition_categories = [
|
||||
173,
|
||||
152,
|
||||
183
|
||||
];
|
||||
|
||||
public function __construct($product)
|
||||
{
|
||||
$this->product = $product;
|
||||
}
|
||||
public function isInstall()
|
||||
{
|
||||
// O'rnatib berish xizmati bor yoki yo'qligini aniqash uchun
|
||||
return $this->product->categories()->whereIn('id', $this->instalition_categories)->count() >= 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user