Welcome Guest, Not a member yet? Register   Sign In
Routing and modules
#2

(This post was last modified: 11-24-2020, 06:53 PM by InsiteFX.)

You need to add all 3 of those to the app/Confog/Autoload.php psr4 section.

PHP Code:
public $psr4 = [
    APP_NAMESPACE               => APPPATH,                                 // For custom app namespace
    'Config'                    => APPPATH  'Config',                     // Config namespace
    'Myth\Auth'                 => ROOTPATH 'Myth/Auth',                  // Module Myth::Auth
    'Insitefx'                  => ROOTPATH 'Insitefx',                   // Modules
    'Insitefx\Blog'             => ROOTPATH 'Insitefx/Blog',              // Module Blog
    'agungsugiarto\boilerplate' => ROOTPATH 'agungsugiarto/boilerplate',  // Module Boilerplate
]; 

Something like that. Insitefx/Admin/Config/Routes.php
The routes are stored in the modules Config folder.

PHP Code:
<?php

/**
 * Insitefx/Admin: routes file.
 */

$routes->group('', ['namespace' => 'Insitefx\Admin\Controllers'], function($routes)
{
    $routes->get('admin''Admin::index');
    $routes->get('admin/(:any)''Admin::view/$1');
}); 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Routing and modules - by lucky - 11-24-2020, 12:33 AM
RE: Routing and modules - by InsiteFX - 11-24-2020, 06:52 PM
RE: Routing and modules - by lucky - 11-25-2020, 12:29 AM
RE: Routing and modules - by InsiteFX - 11-25-2020, 03:46 PM
RE: Routing and modules - by lucky - 11-26-2020, 12:20 AM
RE: Routing and modules - by InsiteFX - 11-26-2020, 03:04 AM
RE: Routing and modules - by lucky - 11-26-2020, 09:57 AM
RE: Routing and modules - by InsiteFX - 11-26-2020, 12:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB