7.9.0
Added
Customizing File Display
By default, Restify will display the file's stored path name. However, you may customize this behavior.
Displaying temporary url
For disks such as S3, you may instruct Restify to display a temporary URL to the file instead of the stored path name:
field('path')
->file()
->path("documents/".Auth::id())
->resolveUsingTemporaryUrl()
->disk('s3'),
The resolveUsingTemporaryUrl
accepts 3 arguments:
-
$resolveTemporaryUrl
- a boolean to determine if the temporary url should be resolved. Defaults totrue
. -
$expiration
- A CarbonInterface to determine the time before the URL expires. Defaults to 5 minutes. -
$options
- An array of options to pass to thetemporaryUrl
method of theIlluminate\Contracts\Filesystem\Filesystem
implementation. Defaults to an empty array.
Displaying full url
For disks such as public
, you may instruct Restify to display a full URL to the file instead of the stored path name:
field('path')
->file()
->path("documents/".Auth::id())
->resolveUsingFullUrl()
->disk('public'),
Fixed
- fix: fixing dynamic user class