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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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