Menu

1 / 2

sample laravel set up easy

DEV Community·Yuki Shiroi·6 months ago
#UMPSbSkw
#laravel#php#tutorial#webdev#fruit
Reading 0:00
15s threshold

PART 1: Setup

composer create-project laravel/laravel fruit-system

cd fruit-system

Create database in phpMyAdmin:

fruit_db

Edit .env:

DB_DATABASE=fruit_db

DB_USERNAME=root

DB_PASSWORD=

Install Breeze:

composer require laravel/breeze --dev

php artisan breeze:install blade

php artisan migrate

npm install

npm run build

Install Bootstrap UI and PDF only:

npm uninstall tailwindcss postcss autoprefixer

composer require aldhix/breeze-bootstrap-ui

php artisan breeze-bootstrap-ui:install --force

composer require barryvdh/laravel-dompdf

npm install

npm run build

Create files:

php artisan make:model Fruit -mcr

php artisan make:controller ReportController

PART 2: Migration

Open database/migrations/xxxx_create_fruits_table.php:

<?php

use Illuminate\Database\Migrations\Migration;

use Illuminate\Database\Schema\Blueprint;

use Illuminate\Support\Facades\Schema;

return new class extends Migration

{

public function up(): void

{

Schema::create('fruits', function (Blueprint $table)…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.