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/inzigd.komma.pro/app/Komma/Workshops/Kms/WorkshopController.php
<?php

namespace App\Komma\Workshops\Kms;

/**
 * @author      Komma <info@komma.pro>
 * @copyright   (c) 2012-2016, Komma
 */

use App\Komma\Kms\Core\SectionController;
use App\Komma\Workshops\Models\Workshop;

final class WorkshopController extends SectionController
{
    protected $slug = "workshops";
    protected $forModelName = Workshop::class;

    function __construct(WorkshopSection $section)
    {
        parent::__construct($section);
    }

//    public function index()
//    {
//
//        $this->populateCategories();
//        return parent::index(); // TODO: Change the autogenerated stub
//    }
//
//    private function populateCategories() {
//        $models = Workshop::all();
//        $models->load('category');
//
//        foreach ($models as $model) {
//            if($model->category->isNotEmpty()) continue;
//            $model->category()->sync([rand(1, 2)]);
//        }
//    }
}