Skip to content

PlusMagi's Blog By Pitt Phunsanit

Plus emotional magic to the knowledge of logic.

  • About’s Pitt
Close Button
PlusMagi's Blog By Pitt Phunsanit Laravel Laravel: Breeze

Laravel: Breeze

2003-08-052003-08-05| phunsanitphunsanit| 0 Comment | 07:00
Categories:
  • Laravel

Laravel Breeze คือ Starter Kit ที่เรียบง่ายและทันสมัยที่สุดของ Laravel ออกแบบมาเพื่อให้ระบบล็อกอิน พื้นฐานเสร็จสมบูรณ์ภายในไม่กี่นาที โดยใช้เครื่องมือมาตรฐานอย่าง Blade หรือ Inertia (Vue/React) และ Tailwind CSS


คุณสมบัติหลัก

Breeze มีฟีเจอร์ที่จำเป็นสำหรับการเริ่มต้นโปรเจกต์ครบถ้วน

  • Authentication: ระบบสมัครสมาชิก , เข้าสู่ระบบ , และออกจากระบบ
  • Password Management: การรีเซ็ตรหัสผ่าน และการยืนยันรหัสผ่าน
  • Email Verification: การยืนยันอีเมลผู้ใช้งาน
  • Profile Management: หน้าแก้ไขข้อมูลส่วนตัวและลบบัญชีผู้ใช้
  • API Support: รองรับการสร้าง API Authentication ผ่าน Laravel Sanctum

วิธีการติดตั้ง

ก่อนเริ่มติดตั้ง ตรวจสอบให้แน่ใจว่าคุณสร้างโปรเจกต์ Laravel ใหม่และเชื่อมต่อ Database เรียบร้อยแล้ว

  1. ติดตั้ง Breeze ผ่าน Composer
    composer require laravel/breeze --dev
  2. เลือก Stack ที่ต้องการ
    คุณต้องรันคำสั่ง
    php artisan breeze:install
    เพื่อเลือกรูปแบบ Frontend ที่ถนัด เช่น
    php artisan breeze:install blade
    • Blade: ใช้เทมเพลต PHP มาตรฐาน
    • Livewire: สำหรับสร้าง UI แบบ Dynamic ด้วย PHP
    • Vue / React: ผ่าน Inertia.js (สำหรับ Single Page Application)
    • API Only: สำหรับทำ Backend อย่างเดียว
  3. Migrate ฐานข้อมูลและ Compile Asset
    หลังจากติดตั้งไฟล์สำเร็จ ให้รันคำสั่งเพื่อสร้าง Table และจัดเตรียมไฟล์ CSS / JS
    php artisan migrate
    npm install
    npm run dev

วิธีใช้งาน

การเข้าถึงหน้าเว็บ

เมื่อติดตั้งเสร็จ คุณจะพบปุ่ม Log in และ Register ที่มุมขวาบนของหน้า Welcome หรือเข้าผ่าน URL โดยตรง

  • your-app.test/login
  • your-app.test/register

การจัดการ Route และ Controller

ไฟล์ทั้งหมดที่ Breeze สร้างขึ้นจะถูกเก็บไว้ในที่ที่แก้ไขง่าย

  • Routes: เช็คได้ที่ไฟล์ routes/auth.php
  • Controllers: อยู่ใน app/Http/Controllers/Auth/
  • Views: อยู่ใน resources/views/auth/ และ resources/views/layouts/

การจำกัดการเข้าถึง

คุณสามารถป้องกันไม่ให้ผู้ที่ยังไม่ได้ล็อกอินเข้าถึงหน้าบางหน้าได้ง่าย ๆ ใน routes/web.php

Route::get ('/dashboard', function () { return view ('dashboard') ;
}) ->middleware (['auth', 'verified']) ->name ('dashboard') ;

ข้อควรระวัง: การติดตั้ง Breeze จะเข้าไป Overwrite ไฟล์บางส่วนในโปรเจกต์ หากคุณมีโค้ดเดิมอยู่แล้ว ควรทำการ Backup หรือทำ Git Commit ไว้ก่อนเริ่มการติดตั้งครับ


อ่านเพิ่มเติม

  • ติดตั้ง laravel ลั๊ลลาเวล
  • Laravel: Jetstream
Tags: Authentication, Blade, Breeze, Inertia, Login, Password, Profile, React, Vue.js

แนะแนวเรื่อง

PREVIOUS Previous post: MacOs: จัดการจอในจอนอกด้วย Lunar
NEXT Next post: Laravel: Jetstream

Projects

  • Statement Columns Mapping Helper
  • PlusMagi Blocks
  • PlusMagi Site Search
  • PlusMagi Tags Reindex
  • jQuery Plus Repeater

Recent Posts

  • การเข้าสู่หน้า BIOS หรือ UEFI
  • SEO: แก้จุกจิกจู้จี้
  • Standard User (User ทั่วไป )Update Windows
  • Windows: ReFS คืออะไร NTFS ใหม่ ?
  • Windows: Check Disk

Archives

Categories

  • .net core (1)
  • art (1)
  • business (831)
    • Business Analysis (286)
    • Finance (31)
    • Real Estate (24)
  • cd (25)
  • ci (25)
  • CMS (15)
  • Communication (31)
  • Computer Hardware (1)
  • computer science (1,648)
    • AI (366)
    • Biology (43)
      • Environment (33)
    • Cloud Computing (300)
    • Data Visualization (39)
    • Mathematics (44)
  • container (2)
  • Culture (6)
  • Data Privacy (1)
  • Data Transformation (7)
  • Design (310)
    • UX/UI (43)
  • development (1)
  • devops (3)
  • digital marketing (1)
  • Education (2)
  • engineering (702)
    • architecture (600)
    • Building Engineering (45)
  • Hardware (2)
  • Health (157)
    • Safety (126)
  • Humanities (291)
    • Academia (89)
    • history (84)
    • Linguistics (14)
    • Literature (77)
  • Information Science (1)
  • Law (301)
  • Life (1,381)
    • Cartoon (24)
    • D.I.Y (37)
    • Mindset (305)
    • Movies (31)
    • Philosophy (211)
    • Psychology (996)
      • Behavioral Science (237)
      • Cognitive Science (194)
    • Sci-Fi (38)
    • Tips and Tricks (32)
    • พุทธ (7)
  • logistics (1)
  • management (873)
    • knowledge management (283)
      • Documentation (93)
    • productivity (4)
    • Project Management (11)
    • strategy (2)
  • Marketing (1)
  • Markup Languages (1)
  • media studies (1)
  • Network (384)
    • IOT (23)
    • Nginx (26)
  • networking (5)
  • operating system (5)
  • Operating Systems (524)
    • Linux (199)
    • macOS (137)
      • Homebrew (24)
    • Shell Script (38)
      • Oh My ZSH (5)
    • Windows (98)
      • PowerShell (26)
  • Process Modeling (1)
  • Programming (2,031)
    • .NET (115)
      • .NET Core EF (9)
      • C# (73)
    • API (394)
      • REST (8)
    • Database (606)
      • MariaDB (37)
      • MySql (69)
      • Oracle Database (24)
      • PostgreSQL (14)
      • RDBMS (42)
      • SQL Server (76)
        • T-SQL (26)
    • Programming Languages (360)
      • Java (95)
      • PHP (212)
      • Python (13)
      • Rust (31)
    • Software Architecture (6)
    • Software Engineering (40)
    • System Analyst (SA) (54)
    • Testing (115)
      • Automated Testing (101)
    • Web (1,284)
      • Apache HTTP Server (33)
      • Backend (991)
        • Laravel (54)
        • Spring Boot (15)
      • Frontend (302)
        • Angular (7)
        • CSS (45)
        • JavaScript (187)
        • jQuery (57)
        • Tabulator (24)
        • Tailwind CSS (4)
        • Vue.js (6)
      • WordPress (31)
  • Programming Language (1)
  • Religion (1)
  • SecDevOps (733)
    • automation (192)
    • CI/CD (134)
    • Docker (89)
    • GIT (56)
    • SVN (6)
    • system (220)
      • System Administration (14)
  • Security (370)
    • Authentication (62)
    • Cryptography (35)
    • Cybersecurity (163)
  • Server Infrastructure (1)
  • Software Development (2)
  • Software Development Practices (1)
  • Spirituality (1)
  • SQL (1)
  • Supply Chain Management (1)
  • system design (1)
  • Technical Support (1)
  • technology (1)
  • Technology History (1)
  • Uncategorized (577)
  • user experience (1)
  • visualization (1)
  • Web Design (1)
  • web development (8)
  • wellness (1)
  • นวนิยายสืบสวน (1)
  • วรรณกรรม (1)
  • เรื่องเล่า (1)

Sirat WordPress Theme By VWThemes

Scroll Up
Go to mobile version