File: D:/HostingSpaces/SBogers10/inzigd.komma.pro/app/Komma/Courses/Kms/CourseController.php
<?php
namespace App\Komma\Courses\Kms;
/**
* @author Komma <info@komma.pro>
* @copyright (c) 2012-2016, Komma
*/
use App\Komma\Kms\Core\SectionController;
use App\Komma\Courses\Models\Course;
final class CourseController extends SectionController
{
protected $slug = "courses";
protected $forModelName = Course::class;
function __construct(CourseSection $section)
{
parent::__construct($section);
}
// public function index()
// {
//
// $this->populateCategories();
// return parent::index(); // TODO: Change the autogenerated stub
// }
//
// private function populateCategories() {
// $models = Course::all();
// $models->load('category');
//
// foreach ($models as $model) {
// if($model->category->isNotEmpty()) continue;
// $model->category()->sync([rand(1, 2)]);
// }
// }
}