项目作者: frknikiz

项目描述 :
Laravel Quick Elfinder package allows you to use Elfinder quickly.
高级语言: PHP
项目地址: git://github.com/frknikiz/laravel-quick-elfinder.git
创建时间: 2015-08-02T20:42:05Z
项目社区:https://github.com/frknikiz/laravel-quick-elfinder

开源协议:Other

下载


Laravel Quick Elfinder

Total Downloads
License

Laravel Quick Elfinder package allows you to use Elfinder quickly.

This packages is only available for Laravel 4.*

Library Features

  • Uses Laravel Elfinder Package
  • fast,simple,not plagued by configuration

Installation

Begin with installing this package through Composer. Edit your project’s composer.json

  1. "require": {
  2. "frknikiz/laravel-quick-elfider":"dev-master"
  3. }

Or require Composer from the Terminal:

  1. composer require frknikiz/laravel-quick-elfinder

Next, update Composer from the Terminal:

  1. composer update

Open app/config/app.php, and add a new item to the providers array.

  1. 'Frknikiz\CustomElfinder\CustomElfinderServiceProvider'

Publish Elfinder config from the Terminal:

  1. php artisan cfinder:pub

Access to security “isAdminLogin” name, you must define a filter.

Publish Elfinder Asset from the Terminal:

  1. php artisan elfinder:publish

Finally,Publish Quick Elfinder Asset from the Terminal:

  1. php artisan asset:publish frknikiz/laravel-quick-elfinder

Usage

In the view file you want to use, call Cutil::getjs() method after you called the jQuery file

Example:

  1. <div>
  2. <input type="text" name="path" disabled/>
  3. <button class="find">Add İmage</button>
  4. <button class="remove">Remove İmage</button>
  5. </div>
  6. <div>
  7. <input type="text" name="path" disabled/>
  8. <button class="find">Add İmage</button>
  9. <button class="remove">Remove İmage</button>
  10. </div>
  11. ...
  12. {{HTML::script('jquery.min.js')}}
  13. {{Cutil::getJs()}}

In this sample above, when you click instance of “find” class, elfinder view will appear. After you choose your image source , image url will place in input.

find“ Class : Opens Elfinder Window

remove“ Class : Clears İnput

Event

imageSelected : It is triggered after selecting pictures.

  1. $(document).on('imageSelected', function (e, data)
  2. {
  3. alert("Image Selected !!!"+data.path);
  4. });

References

Laravel Elfinder

License

  1. Copyright 2015 Furkan İKİZ.
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.