Menu

1 / 2

Laravel setp up sample

DEV Community·top_distribution6432·6 months ago
#JIxRLMnB
#laravel#php#tutorial#webdev#medicine
Reading 0:00
15s threshold

PART 1: Setup

bashcomposer create-project laravel/laravel medicine-system

cd medicine-system

Create database in phpMyAdmin:

medicine_db

Edit .env:

DB_DATABASE=medicine_db

DB_USERNAME=root

DB_PASSWORD=

Install Breeze:

bashcomposer require laravel/breeze --dev

php artisan breeze:install blade

php artisan migrate

npm install

npm run build

Install Bootstrap UI and PDF only:

bashnpm 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:

bashphp artisan make:model Medicine -mcr

php artisan make:controller ReportController

PART 2: Migration

Open database/migrations/xxxx_create_medicines_table.php:

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('medicines',…

Continue reading — create a free account

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