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/QuestionCategories/QuestionCategoryService.php
<?php

namespace App\QuestionCategories;


use App\Base\Service;
use App\QuestionCategories\Models\QuestionCategory;

class QuestionCategoryService extends Service
{

    private $QuestionCategory;

    public function __construct()
    {
        parent::__construct();

        // Set options first if needed
        if(!isset($this->options)) $this->setQuestionCategories();
    }

    /**
     * @return mixed
     */
    public function getQuestionCategories()
    {
        return $this->QuestionCategory;
    }

    public function setQuestionCategories(): void
    {
        $this->QuestionCategory = QuestionCategory::where('active', 1)
            ->with('translation')
            ->has('translation')
            ->orderBy('lft')
            ->get();
    }



}