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?
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 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.
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.
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.
Laravel 5
php artisan make:controller UsersController
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With