php laravel step by step

This tutorial is practical experience we use to learn php and laravel framework.

First step is to have an php environment with laravel framework, a web server and a Database.

you can install XAMP on your MAC/Windows/Linux

I have setup the environment on my Linux server with mysql database.

once your php setup is ready with laravel, create a project to start development.

Creat project –

composer create-project laravel/laravel learning1

ls command to check that directory is created with project name learning1

[[email protected] html]# ls
learning1

default directory structure

[[email protected] learning1]# ls
README.md  artisan    composer.json  config    package.json  public	routes	    storage  vendor
app	   bootstrap  composer.lock  database  phpunit.xml   resources	server.php  tests    webpack.mix.js

to define or change the routes, edit default file name web.php which is inside routes directory and display the list of routes –

To clear the route cache

[[email protected] learning1]# php artisan cache:clear
Application cache cleared!
[[email protected] learning1]# php artisan route:cache
Route cache cleared!
Routes cached successfully!
[[email protected] learning1]# php artisan cache:clear
Application cache cleared!
[[email protected] learning1]# php artisan route:list

Leave a Reply

error: Content is protected !!