Welcome Guest, Not a member yet? Register   Sign In
Myth/Auth - Routing problem
#1

I can't see what I'm doing wrong here, as everything I've read seems to say this SHOULD work.  I'm filtering routes to the User controller, and the controller index method does NOT work, while the profile method works fine.  I'm lost... Confused

Very basic implementation here:

App\Controllers\User.php
PHP Code:
<?php namespace App\Controllers;

class 
User extends Auth
{
    public function 
index()
    {
           echo "Test index";
    }
        
        
public function profile()
    {
           echo "Test profile";
    }



App\Config\Routes.php
PHP Code:
//Restricted to logged in users
$routes->group('user', ['filter' => 'role:Users'], function($routes) {
    $routes->get('user''User::index'); // Does NOT work
    $routes->get('profile''User::profile');  //Works Correctly
}); 
Reply


Messages In This Thread
Myth/Auth - Routing problem - by BilltheCat - 04-12-2020, 04:23 PM
RE: Myth/Auth - Routing problem - by includebeer - 04-12-2020, 06:17 PM
RE: Myth/Auth - Routing problem - by BilltheCat - 04-12-2020, 08:23 PM
RE: Myth/Auth - Routing problem - by BilltheCat - 04-13-2020, 04:25 AM
RE: Myth/Auth - Routing problem - by includebeer - 04-13-2020, 04:26 AM
RE: Myth/Auth - Routing problem - by BilltheCat - 04-13-2020, 04:46 AM
RE: Myth/Auth - Routing problem - by Nome - 04-13-2020, 06:16 AM
RE: Myth/Auth - Routing problem - by includebeer - 04-13-2020, 06:39 AM
RE: Myth/Auth - Routing problem - by Nome - 04-13-2020, 06:51 AM
RE: Myth/Auth - Routing problem - by includebeer - 04-13-2020, 07:08 AM
RE: Myth/Auth - Routing problem - by Nome - 04-13-2020, 07:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB