First Upload
This commit is contained in:
20
app/CustomClasses/GetAndCheckCategoryIds.php
Normal file
20
app/CustomClasses/GetAndCheckCategoryIds.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\CustomClasses;
|
||||
|
||||
use App\Models\Category;
|
||||
|
||||
class GetAndCheckCategoryIds
|
||||
{
|
||||
protected $ids;
|
||||
|
||||
public function __construct(array $ids)
|
||||
{
|
||||
$this->ids = $ids;
|
||||
}
|
||||
|
||||
public function GetCategoryRecords()
|
||||
{
|
||||
return Category::with('device')->whereIn('id', $this->ids)->get();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user