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

Laravel: Jetstream

2021-12-182021-12-18| phunsanitphunsanit| 0 Comment | 07:00
Categories:
  • Laravel

การติดตั้ง Laravel Jetstream เป็นวิธีที่รวดเร็วที่สุดในการสร้างระบบ Login, Register, Two-Factor Authentication และการจัดการ Team ( ถ้าต้องการ ) โดย Jetstream จะมี Stack ให้เลือก 2 แบบคือ Livewire (เหมาะสำหรับสาย PHP / Blade) และ Inertia ( เหมาะสำหรับสาย Vue.js )


  1. ติดตั้ง Jetstream Package
    ใช้ Composer เพื่อดึงตัวติดตั้ง Jetstream เข้ามาในโปรเจกต์
    composer require laravel/jetstream
  2. ในขั้นตอนนี้คุณต้องตัดสินใจว่าจะใช้ Stack ไหน ( เลือกอย่างใดอย่างหนึ่ง )
    • Livewire + Blade
      เหมาะสำหรับคนที่ถนัดเขียน PHP และต้องการความเร็วในการพัฒนาแบบดั้งเดิม
      php artisan jetstream:install livewire
    • Inertia + Vue
      เหมาะสำหรับคนที่ต้องการทำ Single Page Application ( SPA ) โดยใช้ Vue.js
      php artisan jetstream:install inertia
      Note: หากต้องการระบบจัดการทีม ให้เติม --teams ต่อท้ายคำสั่ง เช่น
      php artisan jetstream:install livewire --teams
  3. ติดตั้ง Dependencies และ Compile Assets
    npm install
    npm run build
  4. ตั้งค่า Database และ Migrate
    ตรวจสอบไฟล์ .env ของคุณว่าเชื่อมต่อกับ Database ถูกต้องแล้ว จากนั้นรันคำสั่ง Migrate เพื่อสร้าง Table ต่าง ๆ ( Users, Sessions, 2FA )
    php artisan migrate
  5. ตรวจสอบความเรียบร้อย
    ตอนนี้ระบบพร้อมใช้งานแล้ว คุณสามารถรัน Server เพื่อดูหน้าตาของ Dashboard ใหม่ได้เลย
    php artisan serve
  6. จากนั้นเข้าชมที่ http://127.0.0.1:8000/register เพื่อสร้าง User คนแรกครับ

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

  • ติดตั้ง laravel ลั๊ลลาเวล
  • Laravel: Breeze
ป้ายกำกับ:Blade, Inertia, Livewire, Login, register, Single Page Application, SPA, Two-Factor Authentication, Vue.js

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

PREVIOUS Previous post: Laravel: Breeze
NEXT Next post: Laravel: ระบบ login Breeze และ Jetstream

Projects

  • Statement columns mapping Helper
  • Plusmagi Search
  • jQuery Plus Repeater

Recent Posts

  • Stalwart: วิธีเซ็ต DNS จาก Stalwart ให้รับส่งเมลได้
  • OrbStack: ติดตั้ง
  • VS Code: แทน Azure Data Studio
  • jQuery: import $ ให้เป็น global scope ?
  • DataTables: ต้อนรับ jQuery 4.0

Archives

Categories

  • AI (3)
  • Businesses (1)
  • Design (25)
  • Histories (3)
  • Life (38)
    • Books (11)
      • สืบสวน (4)
    • ECO (3)
    • Sci-Fi (2)
    • พุทธ (3)
  • Network (263)
    • Android (9)
      • F-Droid (7)
    • Apache Apache HTTP Server (17)
    • Docker (25)
    • Homebrew (14)
    • IIS (7)
    • IOT (3)
    • Linux (85)
    • macOS (57)
      • OrbStack (8)
    • Nginx (21)
    • RabbitMQ (4)
    • Samba (5)
    • Shell Script (24)
    • SSH (10)
    • Windows (87)
      • PowerShell (19)
      • WSL (21)
  • Programming (564)
    • API (11)
      • REST (2)
      • Swagger (6)
    • C# (15)
      • .NET Core EF (3)
    • CI/CD (3)
    • CSS (15)
      • Bootstrap (3)
      • Tailwind CSS (2)
    • Database (152)
      • DBeaver (3)
      • MariaDB (14)
      • MySql (52)
      • Oracle (4)
        • 10g (2)
      • PostgreSQL (2)
      • SQL Server (79)
        • ADS (3)
        • SMO (4)
        • SSMS (8)
        • T-SQL (25)
    • Flutter (2)
    • GIT (21)
    • HTML (23)
    • Java (30)
      • JasperReports (3)
      • Joget (19)
      • Spring Boot (3)
    • JavaScript (107)
      • AG Grid (1)
      • Angular (1)
      • jQuery (63)
        • DataTables (13)
      • Tabulator (10)
      • TypeScript (10)
      • Vue.js (3)
    • Node.js (1)
    • PHP (172)
      • CodeIgniter (11)
      • Laravel (32)
        • Laravel 11 (10)
        • Laravel 5 (19)
      • PrestaShop (1)
      • WordPress (18)
      • Yii (19)
        • Yii 2 (16)
    • Playwright (1)
    • PowerBuilder (11)
      • PowerBuilder 8 (10)
    • Python (6)
    • Rust (1)
    • SEO (2)
    • Testing (5)
      • Automated Testing (2)
        • Selenium (2)
    • UML (1)
  • Programs (73)
    • Bitwarden (4)
    • Excel (7)
    • Figma (7)
    • Google Chrome (6)
    • Mozilla Firefox (9)
    • Oh My ZSH (4)
    • Stalwart (6)
    • USB Boot (7)
  • Q & A (5)
  • Security (20)
  • Tips & Tricks (67)
    • iPhone (5)
      • Jailbreaking (2)
  • กฎหมาย (2)
  • คณิตศาสตร์ (1)

Sirat WordPress Theme By VWThemes

Scroll Up
Go to mobile version