Step 1: make project.
composer create -project laravel/laravel project_name “version_name.*”
Step 2 :Create datbase to php
Goto web browser and type url localhost/phpmyadmin and make database
Step 3: Update Database Configuration
We will make database configuration for example database name, username, password etc for our crud application of laravel 5.8.
So let’s open .env file and fill all details like as bellow
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=here your database name(blog)
DB_USERNAME=here database username(root)
DB_PASSWORD=
Step 4: Link with database
php artisan migrate
Step 5: Create Table in database
we are going to create crud application for product. so we have to create migration for “products” table using Laravel 5.8 php artisan command
php artisan make:migration create_products_table –create=products
👍👍👍Step 6: migration
Step 7 : View and make blade file
first go resources than view and make blade file.
i . parent.blade.php
ii. create.blade.php
iii. view.blade.php
iv. edit.blade.php
v. index.blade.php
Step 9 : Route
goto routes and open web.php an make routes
i. universal route
Route::resource ('model_name' , 'Controller_name');
ii. indivisual route
- How to Create Multiple User Based Access Control in Laravel - March 22, 2021
- CRUD OPRATION USING AJAX - March 20, 2021
- LARAVEL CRUD - March 19, 2021