Published by Hilmi Hidayat on July 4, 2024
Laravel 11 #2: Installing and Running a Laravel Project
Creating a simple CRUD (Create, Read, Update, Delete) application in Laravel 11 is a fundamental step in learning the framework. This tutorial will guide you through building a basic CRUD application to manage products. We’ll cover database setup, model creation, routes, controllers, views, and basic CRUD operations.
Step 1: Set Up Laravel Project
Start by creating a new Laravel project:
composer create-project laravel/laravel laravel-crud-example "11.*" --prefer-dist
public function void():
{
Schema::create('products', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->text('description');
$table->timestamps();
});
}