Welcome Guest, Not a member yet? Register   Sign In
Filters just made my head explode?
#2

To add a filter to a route you do it like so.

PHP Code:
<?php

namespace Insitefx\Admin\Config;

/**
 * Insitefx/Name: routes file.
 */


/** @var TYPE_NAME $routes */
$routes->group('', ['namespace' => 'Insitefx\Admin\Controllers'], function($routes)
{
    $routes->get('dashboard''Dashboard::index', ['filter' => 'login']);
}); 

See the filter in the dashboard route? If they are not logged in it will load the login view.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Filters just made my head explode? - by blaasvaer - 09-07-2020, 01:45 AM
RE: Filters just made my head explode? - by InsiteFX - 09-07-2020, 03:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB