I want to run laravel program at CLI, but I don't know how to write the command.
I try to like this /laravel/index.php /controller/method, but it doesn't work.
-
1You can't do that. If you want to create a custom command for console read the doc.thefallen– thefallen2016-06-21 09:04:06 +00:00Commented Jun 21, 2016 at 9:04
3 Answers
you can refer this link for commands : https://laravel.com/docs/5.1/artisan
using artisan you can create your command as well as controller and model for your application
Comments
laravel artisan command provides functionality for CLI. you can use predefined command and also create your own command as per your requirements, Official documents.
Comments
Go to your laravel working folder using CLI
cd your_larave_folder_name
Then run this command
php -S localhost:8888 -t public
This will run your application at port 8888.To access your views using a browser.
localhost:8888/name_of_your_view
You can use any port number other than 8888, also you must run CLI with administrative privileges.