File: D:/HostingSpaces/SBogers10/ste.komma.pro/app/MethodSteps/MethodStepService.php
<?php
namespace App\MethodSteps;
use App\Base\Service;
use App\MethodStepCategories\Models\MethodStepCategory;
use App\MethodSteps\Models\MethodStep;
use Illuminate\Support\Collection;
final class MethodStepService extends Service
{
private $methodSteps;
public function __construct()
{
parent::__construct();
// Set options first if needed
if(!isset($this->methodSteps)) $this->setMethodSteps();
}
public function setMethodSteps()
{
$this->methodSteps = MethodStep::where('lft', '!=', 1)
->with('translation')
->has('translation')
->orderBy('lft')
->get();
}
public function getMethodSteps(): Collection
{
return $this->methodSteps;
}
}