Skip to content

Commit

Permalink
update wording
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Apr 12, 2016
1 parent 3b1b1c8 commit 61dbf68
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,20 @@ The filesystem configuration file is located at `config/filesystems.php`. Within

Of course, you may configure as many disks as you like, and may even have multiple disks that use the same driver.

#### The Local Driver
#### The Public Disk

When using the `local` driver, note that all file operations are relative to the `root` directory defined in your configuration file. By default, this value is set to the `storage/app` directory. Therefore, the following method would store a file in `storage/app/file.txt`:
The `public` disk is meant for files that are going to be publicly accessible. By default, the `public` disk uses the `local` driver and stores these files in `storage/app/public`. To make them accessible from the web, you should create a symbolic link from `public/storage` to `storage/app/public`. This convention will keep your publicly accessible files in one directory that can be easily shared across deployments when using zero down-time deployment systems like [Envoyer](https://envoyer.io).

Storage::disk('local')->put('file.txt', 'Contents');
Of course, once a file has been stored and the symbolic link has been created, you can create an URL to the files using the `asset` helper:

#### The Public Driver
echo asset('storage/file.txt');

The `public` driver is similar to the `local` driver, but is meant for files that are publicly accessible. By default, these files reside in `storage/app/public`. To make them accessible from the web, it is recommended that you create a symlink from `public/storage` to `storage/app/public`. This will keep your writeable/shared files neatly in 1 folder.
#### The Local Driver

Storage::disk('public')->put('file.txt', 'Contents')
When using the `local` driver, note that all file operations are relative to the `root` directory defined in your configuration file. By default, this value is set to the `storage/app` directory. Therefore, the following method would store a file in `storage/app/file.txt`:

You can create an url to the files, just like regular public files.
Storage::disk('local')->put('file.txt', 'Contents');

$url = asset('storage/file.txt');

#### Other Driver Prerequisites

Before using the S3 or Rackspace drivers, you will need to install the appropriate package via Composer:
Expand Down

0 comments on commit 61dbf68

Please sign in to comment.