Download the PHP package bnbwebexpertise/laravel-elfinder without Composer

On this page you can find all versions of the php package bnbwebexpertise/laravel-elfinder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-elfinder

elFinder Package for Laravel 5

Forked version

Packagist License

This packages integrates elFinder 2.1, by making the php files available with Composer (+autoloading) and the assets with a publish command. It also provides some example views for standalone, tinymce and ckeditor. Files are updated from the a seperate build repository

Note: Use php artisan elfinder:publish instead of the old publish command, for future changes!

Installation

Require this package with Composer

composer require bnbwebexpertise/laravel-elfinder

Add the ServiceProvider to the providers array in app/config/app.php

'Barryvdh\Elfinder\ElfinderServiceProvider'

You need to copy the assets to the public folder, using the following artisan command:

php artisan elfinder:publish

Remember to publish the assets after each update (or add the command to your post-update-cmd in composer.json)

Routes are added in the ElfinderServiceProvider. You can set the group parameters for the routes in the configuration. You can change the prefix or filter/middleware for the routes. If you want full customisation, you can extend the ServiceProvider and override the map() function.

Configuration

The default configuration requires a directory called 'files' in the public folder. You can change this by publishing the config file.

php artisan vendor:publish --provider='Barryvdh\Elfinder\ElfinderServiceProvider' --tag=config

In your config/elfinder.php, you can change the default folder, the access callback or define your own roots.

Views

You can override the default views by copying the resources/views folder. You can also do that with the vendor:publish command:

php artisan vendor:publish --provider='Barryvdh\Elfinder\ElfinderServiceProvider' --tag=views

Using Filesystem disks

Laravel 5 has the ability to use Flysystem adapters as local/cloud disks. You can add those disks to elFinder, using the disks config.

This examples adds the local disk and my-disk:

'disks' => [
    'local',
    'my-disk' => [
        'URL' => url('to/disk'),
        'alias' => 'Local storage',
    ]
],

You can add an array to provide extra options, like the URL, alias etc. Look here for all options.

Using Glide for images

See elfinder-flysystem-driver for Glide usage. A basic example with a custom Laravel disk and Glide would be:

  1. Add the disk to your apps config/filesystems disks:

Tip: you can use the extend method to register your own driver, if you want to use non-default Flysystem disks

  1. Create a Glide Server for your disk, eg. on the glide/<path> route, using a cache path:

  2. Add the disk to your elfinder config:

  3. (Optional) Add the glideKey also to the config, and verify the key in your glide route using the Glide HttpSignature.

You should now see a root 'public' in elFinder with the files in your public folder, with thumbnails generated by Glide. URLs will also point to the Glide server, for images.

TinyMCE 4.x

You can use tinyMCE integration with the following route, which by default is /elfinder/tinymce4:

route('elfinder.tinymce4');

In the TinyMCE init code, add the following line:

Then add the following function (change the elfinder_url to the correct path on your system):

TinyMCE 3.x

You can add tinyMCE integration with the following route (default: /elfinder/tinymce):

route('elfinder.tinymce');

In the TinyMCE init code, add the following line:

Then add the following function (change the elfinder_url to the correct path on your system):

CKeditor 4.x

You can add CKeditor integration with the following route:

'elfinder.ckeditor'

In the CKeditor config file:

Standalone Popup Selector

To use elFinder by using a href, button or other element to trigger a popup window, you will need to do the following.

Add support for a popup window, we have used Jacklmoore's jQuery colorbox, (Not included), but you could use any other, obviously adjusting the following instructions accordingly.

Add required routes

You can add the popup with the following action:

'Barryvdh\Elfinder\ElfinderController@showPopup'

Add the required resources

Be Sure that you have published this packages public assets as described above. Then within the \ section of your page include the required colorbox styles (we suggest example1' styles, but any will do)

Colorbox depends on jQuery, so ensure that you have it included within your page, then somewhere after your jQuery file has been included, add the script for jQuery Colorbox, such as...

Now add a link to the popup script, just before the close of your \ tag. A non-minified version is also provided, for if you wish to modify the colorbox config. Simply copy to your assets location, and adjust/minify as desired.

Usage

In order to use the finder to populate an input, simply add your input that you wish to be populated, ensuring to use an ID (This will be used to update the value once a file/image has been selected)......

<label for="feature_image">Feature Image</label>
<input type="text" id="feature_image" name="feature_image" value=""/>

Now just add the element that you wish to use to trigger the popup, ensuring to add the class and the atribute containing the value matching the id of your input you wish to be populated, as below.

<a href="" class="popup_selector" data-inputid="feature_image">Select Image</a>

You can have as many elements as you wish on the page, just be sure to provide each with a unique ID, and set the data-updateid attribute on the selector accordingly.


All versions of laravel-elfinder with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version 5.0.x|5.1.x|5.2.x|5.3.x
studio-42/elfinder Version ~2.1.10
barryvdh/elfinder-flysystem-driver Version ^0.1.4|^0.2
league/flysystem Version ^1.0
league/flysystem-cached-adapter Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bnbwebexpertise/laravel-elfinder contains the following files

Loading the files please wait ....