PHP code example of tadcms / filemanager
1. Go to this page and download the library: Download tadcms/filemanager 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/ */
tadcms / filemanager example snippets
php artisan vendor:publish --provider="Tadcms\FileManager\Providers\FileManagerServiceProvider" --tag=config
php artisan vendor:publish --provider="Tadcms\FileManager\Providers\FileManagerServiceProvider" --tag=assets
php artisan migrate
php artisan storage:link
Route::group(['prefix' => 'file-manager', 'middleware' => ['web', 'auth']], function (){
\Tadcms\FileManager\Routes::web();
});
return [
'disks' => [
'public' => [
/** Mime types can be uploaded */
'mime_types' => [
'image/png',
'image/jpeg',
'image/jpg',
'image/gif',
'image/svg+xml',
'image/svg',
'video/quicktime',
'video/webm',
'video/mp4',
'audio/mp3',
'audio/ogg',
'image/webp',
],
/** Max size of file in bytes */
'max_size' => 1024 * 1024 * 15, // 15 MB
],
],
/**
* On/Off Optimize uploaded images
*
*/
'image-optimize' => env('JW_MEDIA_IMAGE_OPTIMIZE', false),
/**
* Mime types for images
*/
'image_mime_types' => [
'image/png',
'image/jpeg',
'image/jpg',
'image/gif',
'image/svg+xml',
'image/svg',
'image/webp',
],
'models' => [
'media' => \Juzaweb\FileManager\Models\Media::class,
],
];