tsf/elfinder-laravel

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (dev-master) of this package.

A Laravel Bundle to integrate elFinder 2.0

Installs: 339

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 2

Forks: 3

Open Issues: 0

Language:JavaScript

dev-master 2018-06-15 15:04 UTC

This package is auto-updated.

Last update: 2020-01-27 21:27:09 UTC


README

Installation

This project is a fork of: https://github.com/barryvdh/elfinder-bundle

Add this package to your composer.json and run composer update. Add the ServiceProvider to the providers array in app/config/app.php

'TSF\ElfinderLaravel\ElfinderServiceProvider'

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

php artisan asset:publish tsf/elfinder-laravel

You can now add the routes for elFinder to your routes.php

Route::group(array('before' => 'auth'), function()
    {
        \Route::get('elfinder', 'TSF\ElfinderLaravel\ElfinderController@showIndex');
        \Route::any('elfinder/connector', 'TSF\ElfinderLaravel\ElfinderController@showConnector');
    });

Offcourse you can define your own filters/routes if you want.

Configuration

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

php artisan config:publish tsf/elfinder-laravel

In your app/config/packages/tsf/elfinder-laravel, you can change the default folder, the access callback or define your own roots.

CKEditor

You can add CKEditor integration by adding the following route:

\Route::get('elfinder/ckeditor', 'TSF\ElfinderLaravel\ElfinderController@showCKEditor');

Then in your scripts add the following:

CKEDITOR.editorConfig = function( config )
{
    // Define changes to default configuration here. For example:
    // config.language = 'fr';
    // config.uiColor = '#AADC6E';
    config.filebrowserBrowseUrl = '{{{ url("elfinder/ckeditor") }}}';
};