Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change storage path in Laravel

Tags:

php

laravel-4

Is it possible to change to the storage path? I want it to be outside of the repository in our production environment, for deployments to work properly.

The default path is app/storage/. We are using 4.1.x.

like image 342
Znarkus Avatar asked Oct 24 '25 14:10

Znarkus


1 Answers

Yes, it is. You can define it in bootstrap/paths.php:

/*
|--------------------------------------------------------------------------
| Storage Path
|--------------------------------------------------------------------------
|
| The storage path is used by Laravel to store cached Blade views, logs
| and other pieces of information. You may modify the path here when
| you want to change the location of this directory for your apps.
|
*/

'storage' => __DIR__.'/../app/storage',

Don't forget to set the required read/write permissions for the new directory.

like image 150
Quasdunk Avatar answered Oct 27 '25 04:10

Quasdunk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!