In this Laravel project we will learn to create a simple Todo application.
It is assumed that you have some basic knowledge of the following.
It is also assumed that you have the following installed on your development computer.
Feel free to use your favourite IDE or text editor for PHP.
Here are some of the IDEs that you can use for Laravel projects.
If you are looking for text editor then consider using Sublime Text.
You can find this project code in my GitHub repository todo-laravel. Feel free to check that out.
Alright let's go ahead and create a new Laravel project.
Open Terminal and run the following command to create a new Laravel project.
$ composer create-project --prefer-dist laravel/laravel todo-laravel
This will create a new project using composer and will name the project as todo-laravel.
Set writable permission for directories within the storage and the bootstrap/cache directories.
$ chmod -R 755 storage/ bootstrap/cache
To serve project we take help of artisan. Run the following command to see the project output in the browser.
$ php artisan serve
This will start the Laravel development server at http://127.0.0.1:8000.
Open that link and you will get to see the following output.
Now login to your localhost MySQL database and create a new database by the name laravel_todo_db.
Open the todo-laravel project folder in your favourite text editor or IDE and you will see the .env file inside. Open it and set the database credentials.
Your settings will look similar to the following.
Note! The DB_USERNAME and DB_PASSWORD for my localhost MySQL database is root and root123 respectively. Set yours accordingly.
Awesome! Now we have the inital setups done let's move forward and create tables in our new database in the next tutorial.
Thanks for reading. See you in the next tutorial.
Have fun learning :-)
Copyright © 2014 - 2020 DYclassroom. All rights reserved.
rendered in 0.0135 sec