Welcome Guest, Not a member yet? Register   Sign In
Can't find a route for 'cimake:model/PasswordResets'
#1
Lightbulb 

Hi guys.
I changed path App/Config/Routes.php to App/Router/Routes.php
I changed the path in every file and it works properly but unfortunetely CodeIgniter v4.1.9 Command Line Tool stopped working when I'm trying to add new model "php spark make:model TheModel" it trows some errors and I don't understand why it do that.
I thought "App/Config" where defined to somewhere else but it doesn't.
Does someone can help?

[Image: 280375619_3016512835327137_2247434429533...e=627E79CE]
[Image: 280583198_3016525541992533_8262869582682...e=627ED7E2]
Reply
#2

(05-09-2022, 11:47 AM)thedev Wrote: I changed the path in every file and it works properly but unfortunetely CodeIgniter v4.1.9 Command Line Tool stopped working when I'm trying to add new model "php spark make:model TheModel" it trows some errors and I don't understand why it do that.

Where did you change the path?

Routes.php should be in Config directory, because it is a config file.
Reply
#3

(This post was last modified: 05-12-2022, 12:56 AM by InsiteFX.)

@kenjis, is correct you should not change the path.

Also if you change the path to the public folder then you need to edit the spark file
and change the path to the correct one in spark.


PHP Code:
// Path to the front controller                   change this 
define('FCPATH'__DIR__ DIRECTORY_SEPARATOR 'public_html' DIRECTORY_SEPARATOR); 

Change the public to whatever you named the public folder my hosing uses public_html so I code like that.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

(05-11-2022, 12:40 AM)InsiteFX Wrote: @kenjis, is correct you should not change the path.

Also if you change the path to the public folder then you need to edit the spark file
and change the path to the correct one in spark.
Yeh but what should I change in the spark file?
I don't want to change app direcotory. I just want to change App/Config/Routes.php to App/Router/Routes.php
Reply
#5

@thedev Find `Config/Routes.php` in the system folder.
You must change them except RouteCollection.php (and comments).

Code:
Found Occurrences in Directory .../CodeIgniter4/system
bootstrap.php
require_once APPPATH . 'Config/Routes.php';
CodeIgniter.php
            require APPPATH . 'Config/Routes.php';
        // $routes is defined in Config/Routes.php
ControllerMethodReader.php
            // See system/Config/Routes.php
FeatureTestCase.php
            require APPPATH . 'Config/Routes.php';
FeatureTestTrait.php
            require APPPATH . 'Config/Routes.php';
FileLocator.php
    *  $locator->search('Config/Routes.php');
    *      'app/Modules/foo/Config/Routes.php',
    *      'app/Modules/bar/Config/Routes.php',
FilterTestTrait.php
            require APPPATH . 'Config/Routes.php';
RouteCollection.php
            $files = $this->fileLocator->search('Config/Routes.php');
Reply




Theme © iAndrew 2016 - Forum software by © MyBB