Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
z-song committed Aug 9, 2017
1 parent b452869 commit b7d1635
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
31 changes: 11 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,33 @@ laravel-admin-ext/media-manager

Media manager for `local` disk.

## Screenshot

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

## Installation

```
$ composer require laravel-admin-ext/media-manager -vvv
$ php artisan admin:import media-manager
```

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

```php
<?php

namespace App\Providers;
'extensions' => [

use Encore\Admin\Media\MediaManager;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
public function boot()
{
MediaManager::boot();
}
}
```
'media-manager' => [
'disk' => 'public'
],
],

At last run:

```
$ php artisan admin:import media-manager
```

Add a disk

Finally open `http://localhost/admin/media`.
Open `http://localhost/admin/media`.

License
------------
Expand Down
2 changes: 2 additions & 0 deletions src/MediaServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ class MediaServiceProvider extends ServiceProvider
public function boot()
{
$this->loadViewsFrom(__DIR__.'/../resources/views', 'laravel-admin-media');

MediaManager::boot();
}
}

0 comments on commit b7d1635

Please sign in to comment.