Skip to content

Commit b7d1635

Browse files
committed
update readme
1 parent b452869 commit b7d1635

File tree

2 files changed

+13
-20
lines changed

2 files changed

+13
-20
lines changed

README.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,33 @@ laravel-admin-ext/media-manager
33

44
Media manager for `local` disk.
55

6+
## Screenshot
7+
8+
![wx20170809-170104](https://user-images.githubusercontent.com/1479100/29113762-99886c32-7d24-11e7-922d-5981a5849c7a.png)
69

710
## Installation
811

912
```
1013
$ composer require laravel-admin-ext/media-manager -vvv
1114
15+
$ php artisan admin:import media-manager
1216
```
1317

14-
Open `app/Providers/AppServiceProvider.php`, and call the `MediaManager::boot` method within the `boot` method:
18+
Add a disk config in `config/admin.php`:
1519

1620
```php
17-
<?php
1821

19-
namespace App\Providers;
22+
'extensions' => [
2023

21-
use Encore\Admin\Media\MediaManager;
22-
use Illuminate\Support\ServiceProvider;
23-
24-
class AppServiceProvider extends ServiceProvider
25-
{
26-
public function boot()
27-
{
28-
MediaManager::boot();
29-
}
30-
}
31-
```
24+
'media-manager' => [
25+
'disk' => 'public'
26+
],
27+
],
3228

33-
At last run:
34-
35-
```
36-
$ php artisan admin:import media-manager
3729
```
3830

39-
Add a disk
4031

41-
Finally open `http://localhost/admin/media`.
32+
Open `http://localhost/admin/media`.
4233

4334
License
4435
------------

src/MediaServiceProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ class MediaServiceProvider extends ServiceProvider
99
public function boot()
1010
{
1111
$this->loadViewsFrom(__DIR__.'/../resources/views', 'laravel-admin-media');
12+
13+
MediaManager::boot();
1214
}
1315
}

0 commit comments

Comments
 (0)