PHP code example of vish4395 / laravel-file-viewer
1. Go to this page and download the library: Download vish4395/laravel-file-viewer library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
return [
// Default storage disk used when no disk is passed to ::show()
'default_disk' => env('FILE_VIEWER_DISK', 'public'),
// Fall back to Google Docs Viewer for unsupported file types
'google_viewer_fallback' => env('FILE_VIEWER_GOOGLE_FALLBACK', false),
// Toolbar button visibility
'toolbar' => [
'download' => env('FILE_VIEWER_TOOLBAR_DOWNLOAD', true),
'open_in_new_tab' => env('FILE_VIEWER_TOOLBAR_NEW_TAB', true),
'copy_link' => env('FILE_VIEWER_TOOLBAR_COPY_LINK', true),
'fullscreen' => env('FILE_VIEWER_TOOLBAR_FULLSCREEN', true),
],
];