<?php class Controller_Admin_Admin extends Controller_Template { public function before() { parent::before(); $this->template->logged_in = false; if(\Auth::check()) { $user = \Auth::instance()->get_user_id(); $this->user_id = $user[1]; $this->template->logged_in = true; } else { Response::redirect('admin/panel/login'); } } public function action_404() { $messages = array('Aw, crap!', 'Bloody Hell!', 'Uh Oh!', 'Nope, not here.', 'Huh?'); $data['title'] = $messages[array_rand($messages)]; // Set a HTTP 404 output header $this->response->status = 404; $this->template->content = View::factory('404', $data); } }
'admin' => 'admin/panel', // The admin route
The page isn't redirecting properly
class Controller_Admin extends Controller { .... public function action_index() { ... } ... }
'admin' => 'admin/index', // Admin Dashboard 'admin/(:any)' => 'admin/$1', // Admin Controllers
It looks like you're new here. If you want to get involved, click one of these buttons!