Laravel 5 Clear Views Cache

前端 未结 8 1510
悲&欢浪女
悲&欢浪女 2020-12-02 07:41

I notice that Laravel cache views are stored in ~/storage/framework/views. Over time, they get to eat up my space. How do I delete them? Is there any command th

相关标签:
8条回答
  • 2020-12-02 08:09

    in Ubuntu system try to run below command:

    sudo php artisan cache:clear
    
    sudo php artisan view:clear
    
    sudo php artisan config:cache
    
    0 讨论(0)
  • 2020-12-02 08:16

    To get all the artisan command, type...

    php artisan
    

    If you want to clear view cache, just use:

    php artisan view:clear
    

    If you don't know how to use specific artisan command, just add "help" (see below)

    php artisan help view:clear
    
    0 讨论(0)
  • 2020-12-02 08:17

    Right now there is no view:clear command. For laravel 4 this can probably help you: https://gist.github.com/cjonstrup/8228165

    Disabling caching can be done by skipping blade. View caching is done because blade compiling each time is a waste of time.

    0 讨论(0)
  • 2020-12-02 08:22

    There is now a php artisan view:clear command for this task since Laravel 5.1

    0 讨论(0)
  • 2020-12-02 08:26

    Here is a helper that I wrote to solve this issue for my projects. It makes it super simple and easy to be able to clear everything out quickly and with a single command.

    https://github.com/Traqza/clear-everything

    0 讨论(0)
  • 2020-12-02 08:30

    use Below command in terminal

    php artisan cache:clear
    php artisan route:cache 
    php artisan config:cache 
    php artisan view:clear
    
    0 讨论(0)
提交回复
热议问题