function abort404() { $access = Container::getInstance()->access(); http_response_code(404); view('page404', compact('access')); exit; }
function teacherController() { $access = Container::getInstance()->access(); if (!$access->check('teacher')) { abort404(); } view('teachers', compact('access')); }
function studentController() { $access = Container::getInstance()->access(); if (!$access->check('student')) { abort404(); } view('students', compact('access')); }
public function exercise_test_container_make_with_default_arguments() { $container = new Container(); $this->assertInstanceOf(MailDummy::class, $container->make('MailDummy', ['url' => 'styde.net'])); }
public function test_bind_from_class_name() { $container = new Container(); $container->bind('key', 'Foo'); $this->assertInstanceOf('Foo', $container->make('key')); }
function homeController() { $access = Container::getInstance()->access(); view('index', compact('access')); }