Welcome Guest, Not a member yet? Register   Sign In
make:controller not found
#1
Sad 
(This post was last modified: 12-14-2020, 03:41 AM by kuska.)

Hi,

I'm trying to make a controller in VS Code terminal. After giving the command php spark make:controller [c_name] I get the output that Command "make:controller" not found. I've got spark file in my project folder. Everything seems fine. Spark serve running.
CodeIgniter CLI Tool - Version 4.0.4. 
Anyway, after giving the command php spark I can only see make: seeder command on the generators list.

I'm just beginning so please talk to me like to an idiot  Blush
Reply
#2

Did you setup your env file with base_url etc.; Then saved it as .env

Spark need to know where to file the Commands from.

I just created a controller from my PhpStorm Terminal with no problems.


Code:
php spark make:controller Test

Remember that controller names must start with an upper case letter.
What did you Try? What did you Get? What did you Expect?

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

CodeIgniter 4.0.4 does not have `make:controller`.
You need to update it to development version.

$ php builds development
Reply
#4

Oh, that explains it to me why it worked on my system, because I always use the Development version.

Thanks, @kenjis.
What did you Try? What did you Get? What did you Expect?

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

(This post was last modified: 12-15-2020, 03:11 AM by kuska.)

(12-14-2020, 07:04 PM)kenjis Wrote: CodeIgniter 4.0.4 does not have `make:controller`.
You need to update it to development version.

$ php builds development

OK, so I wrote php builds development and it seemed to work. I then put my command down with make:controller and got a brand new error Big Grin

Code:
Warning: require(C:\Users\krut\game.store\app\Config/../../vendor/codeigniter4/codeigniter4/system/bootstrap.php): failed to open stream: No such file or directory in C:\Users\krut\game.store\spark on line 44

Fatal error: require(): Failed opening required '[drive]:\Users\[user]\game.store\app\Config/../../vendor/codeigniter4/codeigniter4/system/bootstrap.php' (include_path='.;C:\php\pear')
in [drive]:\Users\[user]\game.store\spark on line 44

I changed the path in paths php because there was codeigniter4 two times instead of framework but now I got back to the very same error

Code:
Command "make:controller" not found.

--------------------------------------------------
edit:
OK, I installed git and composer again and put a token instead of deleting composer.lock. It's working. No idea if git could be the reason for the errors but well, seems something was wrong with installation anyway. Thanks guys for your help!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB