HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
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;
    }

}