• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.