Welcome Guest, Not a member yet? Register   Sign In
Trouble installing Shield
#4

(This post was last modified: 07-05-2024, 12:41 AM by Littlesciu.)

Hi,

@ozornick: Yes i do, but doesn't work.

@InsiteFX: 
My CI installation is new, I just created the first tutorial page, so my directories are:

appstarter
-app
-public
-test
-vendor
-wirtable

I modify autoload as follow
PHP Code:
  */
    public $psr4 = [
        APP_NAMESPACE => APPPATH// For custom app namespace
        'Config'      => APPPATH 'Config',
        // Shield Auth Modules.
          'CodeIgniter\Settings'  => ROOTPATH 'codeigniter4/settings/src'//Settings Module
        'CodeIgniter\Shield'    => ROOTPATH 'codeigniter4/shield/src',    // Shield Auth Module
    ]; 

But I receive alwayse the same error that depends on

in Routes.php
PHP Code:
// Shield
service('auth')->routes($routes); 

the full code of Routes.php is:

PHP Code:
<?php

use CodeIgniter\Router\RouteCollection;
use 
App\Controllers\Pages;


/**
 * @var RouteCollection $routes
 */

$routes->get('/''Home::index');

$routes->get('pages', [Pages::class, 'index']);
$routes->get('(:segment)', [Pages::class, 'view']);

// Shield
service('auth')->routes($routes); 


If it helps, I have the directories in the XAMPP htdocs
Reply


Messages In This Thread
Trouble installing Shield - by Littlesciu - 07-04-2024, 07:36 AM
RE: Trouble installing Shield - by ozornick - 07-04-2024, 11:13 PM
RE: Trouble installing Shield - by InsiteFX - 07-05-2024, 12:00 AM
RE: Trouble installing Shield - by Littlesciu - 07-05-2024, 12:30 AM
RE: Trouble installing Shield - by InsiteFX - 07-05-2024, 01:18 AM
RE: Trouble installing Shield - by Littlesciu - 07-05-2024, 01:45 AM
RE: Trouble installing Shield - by InsiteFX - 07-05-2024, 03:14 AM
RE: Trouble installing Shield - by Littlesciu - 07-05-2024, 06:28 AM
RE: Trouble installing Shield - by kenjis - 07-06-2024, 11:58 PM
RE: Trouble installing Shield - by Littlesciu - 07-08-2024, 02:09 AM
RE: Trouble installing Shield - by kenjis - 07-08-2024, 02:26 AM
RE: Trouble installing Shield - by Littlesciu - 07-10-2024, 01:34 AM
RE: Trouble installing Shield - by InsiteFX - 07-10-2024, 03:33 AM
RE: Trouble installing Shield - by supersantie - 01-12-2025, 07:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB