![]() |
Hi everyone,
I'm new to COdeIgniter and trying to install Shield. I have CI installed correctly, I have Shield installed but when I go to run the command: Code: php spark shield:setup I receive the message: Code: Command "shield:setup" not found. At this point I follow the manual installation guide but when i have to execute the command: Code: php spark migrate --all I receive the message: Code: Call to a member function routes() on null Does anyone know how I can solve it? Thanks!
You execute composer update ?
If you install manually, Shield will not work if it is not configured in the app/Config/Autoload,php.
Example: I Use my name for namespace Root app system public ---- index.php InsiteFX -- Blog -- etc. app/Config/Autoload.php PHP Code: public $psr4 = [ What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
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: */ But I receive alwayse the same error that depends on in Routes.php PHP Code: // Shield the full code of Routes.php is: PHP Code: <?php If it helps, I have the directories in the XAMPP htdocs
If your using Composer don't use the code I posted, its for a manual install.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-05-2024, 01:18 AM)InsiteFX Wrote: If your using Composer don't use the code I posted, its for a manual install. Ok, I've installed Shield by composer, but I have to do the manual setup because the command Code: php spark shield:setuppark shield:setup doesn't work. Now I removed your code but I still have the same problem ![]() It seems like it can't find the routes function, but I don't understand how to tell it where it is
Did you rename the public folder?
Spark will not work if you move or rename the public folder. If you did then you need to edit the Spark file and change the path to the public folder to the new path. As below you can see I had to change it because my site uses public_html so I code with it like that. PHP Code: // Path to the front controller What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-05-2024, 03:14 AM)InsiteFX Wrote: Did you rename the public folder? No, I didn't rename any pages. After installation of Code Igniter with compose I follow this tutorial: https://www.codeigniter.com/user_guide/t...pages.html and it works, after I installed the official packages Settings and Shield.
What do you know, is there any incompatibility on XAMPP?
Because composer didn't give me any errors, so I don't understand how to solve it. |
Welcome Guest, Not a member yet? Register Sign In |