update 1.0.8.0
Commits for version update
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
1. [Intergration](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/integration.md)
|
||||
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/config.md)
|
||||
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/customization.md)
|
||||
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/events.md)
|
||||
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/upgrade.md)
|
||||
|
||||
## Config
|
||||
|
||||
|
@@ -4,6 +4,8 @@
|
||||
1. [Intergration](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/integration.md)
|
||||
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/config.md)
|
||||
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/customization.md)
|
||||
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/events.md)
|
||||
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/upgrade.md)
|
||||
|
||||
## Customization
|
||||
|
||||
@@ -44,5 +46,10 @@ Feel free to customize the routes and views if your need.
|
||||
1. Copy the views from /vendor/unisharp/laravel-filemanager/src/views/ :
|
||||
|
||||
```bash
|
||||
php artisan vendor:publish --tag=lfm_views
|
||||
php artisan vendor:publish --tag=lfm_view
|
||||
```
|
||||
|
||||
### Translations
|
||||
|
||||
1. Copy `vendor/unisharp/laravel-filemanager/src/lang/en` to `/resources/lang/vendor/laravel-filemanager/<YOUR LANGUAGE>/lfm.php`
|
||||
2. Change the file according your preferences
|
||||
|
44
vendor/unisharp/laravel-filemanager/doc/events.md
vendored
Normal file
44
vendor/unisharp/laravel-filemanager/doc/events.md
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
## Documents
|
||||
|
||||
1. [Installation](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/installation.md)
|
||||
1. [Intergration](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/integration.md)
|
||||
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/config.md)
|
||||
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/customization.md)
|
||||
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/events.md)
|
||||
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/upgrade.md)
|
||||
|
||||
## List of events
|
||||
* Unisharp\Laravelfilemanager\Events\ImageWasUploaded
|
||||
|
||||
## How to use
|
||||
|
||||
To use events you can add a listener to listen to the events
|
||||
|
||||
Snippet for `EventServiceProvider`
|
||||
```php
|
||||
protected $listen = [
|
||||
ImageWasUploaded::class => [
|
||||
UploadListener::class,
|
||||
],
|
||||
];
|
||||
```
|
||||
|
||||
The `UploadListener` will look like:
|
||||
```php
|
||||
class UploadListener
|
||||
{
|
||||
public function handle($event)
|
||||
{
|
||||
$method = 'on'.class_basename($event);
|
||||
if (method_exists($this, $method)) {
|
||||
call_user_func([$this, $method], $event);
|
||||
}
|
||||
}
|
||||
|
||||
public function onImageWasUploaded(ImageWasUploaded $event)
|
||||
{
|
||||
$path = $event->path();
|
||||
//your code, for example resizing and cropping
|
||||
}
|
||||
}
|
||||
```
|
@@ -4,6 +4,8 @@
|
||||
1. [Intergration](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/integration.md)
|
||||
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/config.md)
|
||||
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/customization.md)
|
||||
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/events.md)
|
||||
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/upgrade.md)
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -13,7 +15,7 @@
|
||||
|
||||
## Notes
|
||||
|
||||
* For `laravel 5.2`, please set `'middlewares' => ['web', 'auth'],` in config/lfm.php
|
||||
* For `laravel 5.2` and `laravel 5.3`, please set `'middlewares' => ['web', 'auth'],` in config/lfm.php
|
||||
* With laravel-filemanager >= 1.3.0, the new configs `valid_image_mimetypes` and `valid_file_mimetypes` restrict the MIME types of the uploading files.
|
||||
|
||||
## Installation
|
||||
@@ -39,6 +41,9 @@
|
||||
'Image' => Intervention\Image\Facades\Image::class,
|
||||
```
|
||||
|
||||
Code above is for Laravel 5.1.
|
||||
In Laravel 5.0 should leave only quoted class names.
|
||||
|
||||
1. Publish the package's config and assets :
|
||||
|
||||
```bash
|
||||
|
@@ -1,9 +1,11 @@
|
||||
## Documents
|
||||
|
||||
1. [Installation](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/installation.md)
|
||||
1. [Intergration](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/integration.md)
|
||||
1. [Integration](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/integration.md)
|
||||
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/config.md)
|
||||
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/customization.md)
|
||||
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/events.md)
|
||||
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/upgrade.md)
|
||||
|
||||
## WYSIWYG Editor Integration:
|
||||
### Option 1: CKEditor
|
||||
@@ -15,7 +17,7 @@
|
||||
Sample 1 - Replace by ID:
|
||||
```html
|
||||
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
|
||||
<textarea id="my-editor" name="content" class="form-control">{!! old('content', $content) !!}</textarea>
|
||||
<textarea id="my-editor" name="content" class="form-control">{!! old('content', 'test editor content') !!}</textarea>
|
||||
<script>
|
||||
CKEDITOR.replace( 'my-editor', {
|
||||
filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images',
|
||||
@@ -30,8 +32,9 @@
|
||||
|
||||
```html
|
||||
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<script src="/vendor/unisharp/laravel-ckeditor/adapters/jquery.js"></script>
|
||||
<textarea name="content" class="form-control my-editor">{!! old('content', $content) !!}</textarea>
|
||||
<textarea name="content" class="form-control my-editor">{!! old('content', 'test editor content') !!}</textarea>
|
||||
<script>
|
||||
$('textarea.my-editor').ckeditor({
|
||||
filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images',
|
||||
@@ -50,7 +53,7 @@
|
||||
<script>
|
||||
var editor_config = {
|
||||
path_absolute : "/",
|
||||
selector: "textarea",
|
||||
selector: "textarea.my-editor",
|
||||
plugins: [
|
||||
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
|
||||
"searchreplace wordcount visualblocks visualchars code fullscreen",
|
||||
@@ -85,7 +88,7 @@
|
||||
</script>
|
||||
```
|
||||
|
||||
##Independent use
|
||||
##Standalone button
|
||||
|
||||
If you are going to use filemanager independently, meaning set the value of an input to selected photo/file url, follow this structure:
|
||||
|
||||
|
14
vendor/unisharp/laravel-filemanager/doc/upgrade.md
vendored
Normal file
14
vendor/unisharp/laravel-filemanager/doc/upgrade.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
## Documents
|
||||
|
||||
1. [Installation](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/installation.md)
|
||||
1. [Intergration](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/integration.md)
|
||||
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/config.md)
|
||||
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/customization.md)
|
||||
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/events.md)
|
||||
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/upgrade.md)
|
||||
|
||||
## Upgrade guide
|
||||
* `composer update unisharp/laravel-filemanager`
|
||||
* `php artisan vendor:publish --tag=lfm_view --force`
|
||||
* `php artisan vendor:publish --tag=lfm_config --force` (IMPORTANT: please backup your own `config/lfm.php` first)
|
||||
|
Reference in New Issue
Block a user