Skip to content

Optimizes the cached files in the Laravel project by clearing it and regenerating a new one.

Notifications You must be signed in to change notification settings

DioChuks/LaravelCacheZap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Laravel Cache Clear and Regenerate Script

This Bash script helps automate the process of clearing and re-generating the Laravel application's cache using the php artisan optimize:clear and php artisan optimize commands.

Features

  • Clears existing cache (config, route, view, etc.)
  • Re-generates cache for optimized performance
  • Prompts the user for confirmation before executing
  • Checks if PHP and Artisan are available
  • Provides error handling and messages for failed commands
  • Prints a success message once the process is completed

Prerequisites

Before running the script, ensure the following:

  • PHP is installed on your system.
  • The script is run from the root directory of a Laravel project (where the artisan file is located).

Usage

  1. Clone this repository or copy the script to your Laravel project’s root directory.

  2. Open your terminal and navigate to your Laravel project’s root directory.

  3. Make the script executable by running:

    chmod +x cache_clear_and_regenerate.sh

About

Optimizes the cached files in the Laravel project by clearing it and regenerating a new one.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages