This website collects cookies to deliver better user experience
Laravel 8.0 CRUD Tutorial Using Mysql Database
Laravel 8.0 CRUD Tutorial Using Mysql Database
Hello Artisan,
Today we will create a CRUD application in Laravel using Mysql Database. CRUD extends Create, Read, Update, Delete. We performing This operation in our new fresh laravel project. So, let’s start.
Create a Laravel Project first, run this command
composer create-project --prefer-dist laravel/laravel blog
After completion the creation of laravel project, lets go…
*Make databse Connection *
create a databse in the mysql database after that go to the .env file
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\ProductController;
use App\Http\Controllers\UserController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('index');
});
Route::resource('product',ProductController::class);