dev-master
9999999-devA Laravel Bundle to integrate elFinder 2.0
The Requires
- php >=5.3.0
- illuminate/support 4.2.*
by Marian Perca
Wallogit.com
2017 © Pedro Peláez
A Laravel Bundle to integrate elFinder 2.0
This project is a fork of: https://github.com/barryvdh/elfinder-bundle, (*1)
Add this package to your composer.json and run composer update. Add the ServiceProvider to the providers array in app/config/app.php, (*2)
'TSF\ElfinderLaravel\ElfinderServiceProvider'
You need to copy the assets to the public folder, using the following artisan command:, (*3)
php artisan asset:publish tsf/elfinder-laravel
You can now add the routes for elFinder to your routes.php, (*4)
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., (*5)
The default configuration requires a directory called 'files' in the public folder. You can change this by publishing the config file., (*6)
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., (*7)
You can add CKEditor integration by adding the following route:, (*8)
\Route::get('elfinder/ckeditor', 'TSF\ElfinderLaravel\ElfinderController@showCKEditor');
Then in your scripts add the following:, (*9)
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.filebrowserBrowseUrl = '{{{ url("elfinder/ckeditor") }}}';
};
A Laravel Bundle to integrate elFinder 2.0