Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

jmrashed/devops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

devops

Let's expand on the Laravel aliases in your .zshrc file to include more advanced and commonly used commands:

Laravel aliases

alias art='php artisan'
alias migrate='php artisan migrate'
alias migrate:fresh='php artisan migrate:fresh'
alias migrate:refresh='php artisan migrate:refresh'
alias migrate:rollback='php artisan migrate:rollback'
alias db:seed='php artisan db:seed'
alias tinker='php artisan tinker'
alias optimize='php artisan optimize'
alias route:clear='php artisan route:clear'
alias cache:clear='php artisan cache:clear'
alias config:clear='php artisan config:clear'
alias view:clear='php artisan view:clear'
alias queue:work='php artisan queue:work'
alias queue:listen='php artisan queue:listen'
alias schedule:run='php artisan schedule:run'
alias storage:link='php artisan storage:link'
alias key:generate='php artisan key:generate'
alias down='php artisan down'
alias up='php artisan up'
alias make:model='php artisan make:model'
alias make:controller='php artisan make:controller'
alias make:middleware='php artisan make:middleware'
alias make:command='php artisan make:command'
alias make:job='php artisan make:job'
alias make:mail='php artisan make:mail'
alias make:notification='php artisan make:notification'
alias make:policy='php artisan make:policy'
alias make:provider='php artisan make:provider'
alias make:request='php artisan make:request'
alias make:resource='php artisan make:resource'
alias make:seeder='php artisan make:seeder'
alias make:test='php artisan make:test'

Explanation:

  1. Basic Artisan Commands:

    • art: Short for php artisan.
    • migrate: Runs migrations.
    • migrate:fresh: Drops all tables and migrates.
    • migrate:refresh: Rolls back migrations and migrates again.
    • migrate:rollback: Rolls back the last database migration batch.
  2. Database and Seeder Commands:

    • db:seed: Seeds the database with records.
  3. Optimization and Cache Commands:

    • optimize: Optimizes the framework for better performance.
    • route:clear: Clears route cache.
    • cache:clear: Clears application cache.
    • config:clear: Clears configuration cache.
    • view:clear: Clears compiled view files.
  4. Queue Commands:

    • queue:work: Processes jobs on the queue.
    • queue:listen: Listens to the queue and runs jobs as they come.
  5. Scheduler Command:

    • schedule:run: Runs the Laravel scheduler.
  6. Miscellaneous Commands:

    • storage:link: Creates a symbolic link from public/storage to storage/app/public.
    • key:generate: Generates an application key.
    • down: Puts the application into maintenance mode.
    • up: Takes the application out of maintenance mode.
  7. Make Commands for Generating Laravel Components:

    • These aliases simplify the generation of various Laravel components (make:model, make:controller, etc.).

How to Use:

  1. Open your terminal.
  2. Navigate to your home directory by typing cd ~.
  3. Open .zshrc in your preferred text editor (e.g., nano ~/.zshrc).
  4. Paste the advanced alias definitions at the end of the file.
  5. Save and close the file.
  6. To apply the changes, either restart your terminal or run source ~/.zshrc.

Now, you can use these aliases to quickly execute Laravel commands and generate components without typing out the full php artisan command each time. Adjust or add aliases as per your specific Laravel project needs!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published