I'll demonstrate how to install the file manager package in a Laravel application in this blog. This package supports the integration of cloud storage and the selection of various files.
This File Manager is simple to setup, and the forthcoming version will have cloud support.

Features :-

  1. Integration of CKEditor, TinyMCE, and Summernote
  2. Independent button
  3. submitting proof
  4. Image scaling and cropping
  5. Multi-user public and private folders
  6. Customizable folder path, middlewares, routes, and views
  7. Offers support for files and images. Every kind operates in a unique directory.
  8. The following localities are supported: ar, bg, de, el, en, es, fa, fr, it, he, hu, nl, pl, pt-BR, pt PT, ro, ru, sv, tr, zh-CN, and zh-TW

I'll provide a complete example of how to incorporate a file management package here. Let's proceed by following the steps below.

Install Laravel App

You can install the fresh Laravel app in this stage. Open a terminal and type the command below.

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

Install Unisharp File Manager Package

Installing the file manager package in this Laravel application step. Open a terminal and type the command below.

composer require unisharp/laravel-filemanager

Add Provider and Aliase

You can add providers and aliases in the configuration app file in this phase, so let's open the app.php file and do that.

config/app.php

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

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

Publish Config File

Using the command below, you can publish the package's configuration and assets in this phase.

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

Create symbolic link

Using the command below, you can build a symbolic link in this phase.

php artisan storage:link

Edit .env File

We must alter the .env file in this step to replace APP URL with your localhost URL.

.env

http://localhost:8000

Add Route

Currently, we must build a route to the Laravel application that provides access to the File Manager package. so add the following route by opening your "routes/web.php" file.

routes/web.php

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

Now that our example is ready to run, use the command below for a quick run:

php artisan serve

You may now open the URL below in your browser after first logging in.

http://localhost:8000/laravel-filemanager


Recommended Posts

View All

PayPal Integration in Laravel Example


PayPal Integration in Laravel, laravel paypal integration, laravel setup paypal, laravel paypal integration example

Laravel 9 Install Vue Auth Tutorial with Example


In this article, I'll demonstrate how to use the Laravel UI and Vue Auth scaffolding to create login, register, logout, forget password, profile, and...

Laravel Eloquent Query - Laravel whereKey method


We'll look at the whereKey method in Laravel Eloquent in this post. whereKey is an extremely easy-to-use tool with a lot of potential.

Laravel 9 Elasticsearch Integration From Scratch With Example


In this post, we'll talk about how to incorporate Elasticsearch from scratch using a Laravel 9 example.

Laravel Full Text Search with Scout


You will have learned how the scout elastic search functions from today's tutorial