Developer Guideline
  • Home
  • 🧠Must you know
    • Algorithm
    • Architecture
      • API
    • Comparison
      • ID Token vs Access Token
      • Lazy Loading vs Eager Loading
      • Morphs vs Foreign Key
      • UUID vs ULID
      • GraphQL vs REST
      • Cache vs CDN
      • Concurrency vs Parallelism
      • Null vs Not Null
    • Diagram
      • CI/CD Pipeline
      • High Performance Culture
  • ☂️Laravel
    • Template
      • Template System Check in Route on Laravel
      • Template Function in FormController on Laravel
      • Template Route call FormController on Laravel
      • Template Route Prefix Name on Laravel
      • Template Basic and Custom Pagination on Laravel
      • Template PHP Artisan Command
      • Template Route for App Environment
    • Feature
      • Data Type
      • Mailables
      • Rules
    • Package
    • Document
  • 🫖Collaboration Agreement
    • Naming Convention
      • Naming Convention for Git Branch
      • Naming Convention for Environment Variable
    • Rule
      • Rule of Commit Message
      • Semantic Versioning
  • 🦣Project Manager
    • Requirements
      • System Requirements
      • Technical Requirements
      • Functional Requirements
Powered by GitBook
On this page
  • 🐴 Key Generate
  • 🦉 Migrate Database
  • 🦣 Make Object
  • 🪸 Check
  • 🪼 Encrypt Decrypt Environment
  • 🦀 Clear Config
  • 🐧 Maintenance Mode
  1. Laravel
  2. Template

Template PHP Artisan Command

ตัวอย่าง Command ของ php artisan ที่ใช้งานบ่อยๆ ร่วมกับ Laravel Framework

🐴 Key Generate

php artisan key:generate

🦉 Migrate Database

php artisan migrate:fresh
php artisan migrate:refresh --seed

🦣 Make Object

php artisan make:model Example
php artisan make:migration create_example_table
php artisan make:seeder ExampleSeeder
php artisan make:factory ExampleFactory
php artisan make:controller ExampleController
php artisan make:rule ExampleRule

🪸 Check

php artisan --version
php artisan about
php artisan config:show database

🪼 Encrypt Decrypt Environment

php artisan env:encrypt --key=3UVsEgGVK36XN82KKeyLFMhvosbZN1aF
php artisan env:decrypt --key=3UVsEgGVK36XN82KKeyLFMhvosbZN1aF

🦀 Clear Config

php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan event:clear
php artisan view:clear
php artisan clear-compiled    // Clear Blade
php artisan optimize:clear    // Clear All

🐧 Maintenance Mode

php artisan down --render="errors::503"
php artisan down --redirect=/
php artisan up
test
PreviousTemplate Basic and Custom Pagination on LaravelNextTemplate Route for App Environment

Last updated 8 months ago

☂️