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)]);
// }
// }
}