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/douven.komma.pro/app/KommaApp/Core/FrontendController.php
<?php
namespace App\KommaApp\Core;


use App\KommaApp\Kms\Core\Kms;
use App\KommaApp\Kms\Core\Sections\SectionService;

abstract class FrontendController extends WildcardController
{
    /** @var string $forModelName For which model this controller works for */
    protected $forModelName;

    /** @var SectionService $service */
    protected $service;

    /** @var Kms $kms*/
    protected $kms;


    public function __construct()
    {
        $this->validateInitialisation();
        $this->kms = \App::make(Kms::class);
    }

    private function validateInitialisation()
    {
        if(!$this->forModelName) throw new \RuntimeException('Make sure you set (override) the $forModelName property in the controller ('.get_class($this).') to the eloquent model the controller does it\'s job for.');
        if(!$this->service) throw new \RuntimeException('Make sure you set (override) the $service property in the controller ('.get_class($this).') to SectionService implementation the controller does it\'s job for.');
    }
}