Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating UserController.php with artisan is failing

Following along with Learning Laravel 4 Application Development - Hardik Danger.

I attempt to create my first controller with artisan by doing the following:

php artisan Usercontroller:make users

And I get an error:

  [InvalidArgumentException]                                        
  There are no commands defined in the "Usercontroller" namespace.  

  Did you mean this?                                                
      controller 

What is happening here?

like image 401
sparecycle Avatar asked May 20 '14 01:05

sparecycle


People also ask

Can php artisan serve?

The Laravel PHP artisan serve command helps running applications on the PHP development server. As a developer, you can use Laravel artisan serve to develop and test various functions within the application. It also accepts two additional options. You can use the host for changing application's address and port.

What php artisan down does?

What happens after you run php artisan down is that it creates a file named down inside storage/framework . After running php artisan up the file is removed. You can create the file manually inside storage/framework . It will down your project.

How do I run php artisan command in Laravel controller?

So we can do it by using Artisan facade. In Laravel Artisan facade that way we can easily run the all artisan command also with argument. So Artisan facade have two method one call() and another one is queue() through we can simply make process in call like seeder and also migration run etc.

What is php artisan command?

Artisan is the name of the command-line interface included with Laravel. It provides a number of helpful commands for your use while developing your application. It is driven by the powerful Symfony Console component.


1 Answers

Laravel 5

php artisan make:controller UsersController
like image 173
Raj Nandan Sharma Avatar answered Oct 05 '22 00:10

Raj Nandan Sharma