Skip to content

Commit e183e63

Browse files
committed
update readme
1 parent 7e9af2a commit e183e63

File tree

2 files changed

+15
-24
lines changed

2 files changed

+15
-24
lines changed

README.md

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323

2424
1. Edit `config/app.php` :
2525

26-
Add this in service providers
26+
Add service providers
2727

2828
```php
2929
Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider::class,
3030
Intervention\Image\ImageServiceProvider::class,
3131
```
3232

33-
And add this in class aliases
33+
And add class aliases
3434

3535
```php
3636
'Image' => Intervention\Image\Facades\Image::class,
@@ -42,14 +42,8 @@
4242
php artisan vendor:publish --tag=lfm_config
4343
php artisan vendor:publish --tag=lfm_public
4444
```
45-
46-
1. Set user's folder name (with a column name in users table) in `config/lfm.php` :
47-
48-
```php
49-
'user_field' => 'name',
50-
```
5145
52-
1. View initiation
46+
1. Initiate ckeditor with options :
5347
5448
```javascript
5549
<script>
@@ -60,20 +54,9 @@
6054
</script>
6155
```
6256
63-
Or initiate using ckeditor jquery adapter
57+
1. Ensure that the files & images directories(in `config/lfm.php`) are writable by your web server
6458
65-
```javascript
66-
<script>
67-
$('textarea').ckeditor({
68-
filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images'
69-
filebrowserBrowseUrl: '/laravel-filemanager?type=Files'
70-
});
71-
</script>
72-
```
73-
74-
1. Ensure that the files & images directories are writable by your web server
75-
76-
## Setting config
59+
## Config
7760
7861
In `config/lfm.php` :
7962
@@ -92,7 +75,7 @@ In `config/lfm.php` :
9275
// true : user can upload files to shared folder and their own folder
9376
// false : all files are put together in shared folder
9477
95-
'user_field' => 'name',
78+
'user_field' => 'id',
9679
// determine which column of users table will be used as user's folder name
9780

9881
'shared_folder_name' => 'shares',
@@ -127,6 +110,14 @@ In `config/lfm.php` :
127110

128111
1. To customize the views :
129112

113+
on Linux :
114+
130115
```bash
131116
cp -rf vendor/unisharp/laravel-filemanager/src/views/* resources/views/vendor/laravel-filemanager/
132117
```
118+
119+
on MAC :
120+
121+
```bash
122+
cp -rf vendor/unisharp/laravel-filemanager/src/views/ resources/views/vendor/laravel-filemanager/
123+
```

src/config/lfm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'allow_multi_user' => true,
1111

12-
'user_field' => 'name',
12+
'user_field' => 'id',
1313

1414
'shared_folder_name' => 'shares',
1515
'thumb_folder_name' => 'thumbs',

0 commit comments

Comments
 (0)