-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.md.bak
76 lines (57 loc) · 1.81 KB
/
README.md.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Laravel 5 FileManager - Deprecated!
========
## Installation
### Laravel >= 5.5:
Require this package with composer:
```php
composer require ybaruchel/laravel-filemanager
```
That's it :)
### Laravel <= 5.4:
Require this package with composer:
```php
composer require ybaruchel/laravel-filemanager
```
After updating composer, add the ServiceProvider to the providers array in config/app.php
```php
Ybaruchel\LaravelFileManager\FileManagerServiceProvider::class,
```
If you want to use the facades, add this to your facades in app.php:
```php
'FileManager' => Ybaruchel\LaravelFileManager\Support\Facades\FileManager::class,
'Cropper' => Ybaruchel\LaravelFileManager\Support\Facades\Cropper::class,
```
### Configuration:
Register package's routes in the routes service provider file:
```php
FileManager::routes();
```
Publish the config file using:
```php
php artisan vendor:publish --tag="file-manager-config"
```
Include the tightenco/ziggy js routes putting the routes generator on your layout file (in the ```<head>``` tag):
```php
@routes
```
For including the package assets add the next lines to your layout template:
```php
// Inside the <head> tag
<meta name="csrf-token" content="{{ csrf_token() }}">
// And
@include('FileManager::partials.styles')
// Before closing the <body> tag
<script>
$(function () {
FileManagerModal.init();
});
</script>
@include('FileManager::partials.scripts')
@include('FileManager::partials.file-manager-modal')
```
Add the crop validation translation to your validation.php translation file:
```php
'is_croppable' => 'The :attribute is not croppable according to all sizes.',
```
Prepare a minimalist layout for popup state, then add it to the file-manager.php config file.
* Make sure you choose a disk on the package configuration file - Files will be stored on that disk.