Hello Devs,

In this tutorial, we are going to learn how to install file manager package in laravel application.

Follow this step by step guide given below:




Step 1 :


 Install Laravel App

composer create-project --prefer-dist laravel/laravel blog



Step 2 : 


Install Unisharp File Manager Package

composer require unisharp/laravel-filemanager



Step 3 : 


Add Provider and Alias config/app.php

//Providers
UniSharp\LaravelFilemanager\LaravelFilemanagerServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,

//Aliases
'Image' => Intervention\Image\Facades\Image::class,



Step 4 : 


Publish Config File

php artisan vendor:publish --tag=lfm_config
php artisan vendor:publish --tag=lfm_public



Step 5 : 


Create symbolic link

php artisan storage:link




Step 6 :

 

Edit .env File

APP_URL=http://localhost:8000



Step 7 :

 

Add Route routes/web.php

Route::group(['prefix' => 'laravel-filemanager', 'middleware' => ['web', 'auth']], function (){
    \UniSharp\LaravelFilemanager\Lfm::routes();
});


Run this command:

php artisan serve

Open this URL:

http://localhost:8000/laravel-filemanager


I hope this example helps you.