The
storage_path
function returns the fully qualified path to your application's storage
directory. You may also use the storage_path
function to generate a fully qualified path to a given file within the storage directory:<?php $path = storage_path();
$path = storage_path('app/file.txt');
<?php return;
$file = storage_path('framework/cache/lw-checksum-log.json');
Artisan::command('livewire:monitor-checksum', function () use ($file) {
File::put($file, json_encode(['checksums' => [], 'failure' => null]));
<?php 'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_path' => storage_path('framework/cache/data'),
],
<?php 'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_path' => storage_path('framework/cache/data'),
],
'memcached' => [
<?php 'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
<?php 'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => false,
<?php 'links' => [
public_path('storage') => storage_path('app/public'),
],
];
<?php 'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
<?php 'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => env('LOG_DAILY_DAYS', 14),
'replace_placeholders' => true,
<?php ],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
<?php |
'files' => storage_path('framework/sessions'),
|--------------------------------------------------------------------------
<?php 'compiled' => env(
'VIEW_COMPILED_PATH',
realpath(storage_path('framework/views'))
),
];
<?php public function flushFacades()
{
if (! $this->files->exists($storagePath = storage_path('framework/cache'))) {
return;
}
<?php protected function ensureOutputIsBeingCaptured()
{
if (is_null($this->output) || $this->output == $this->getDefaultOutput()) {
$this->sendOutputTo(storage_path('logs/schedule-'.sha1($this->mutexName()).'.log'));
}
}
<?php protected function ensureFacadeExists($alias)
{
if (is_file($path = storage_path('framework/cache/facade-'.sha1($alias).'.php'))) {
return $path;
}
<?php $this->laravel->maintenanceMode()->activate($downFilePayload);
file_put_contents(
storage_path('framework/maintenance.php'),
file_get_contents(__DIR__.'/stubs/maintenance-mode.stub')
);