Skip to content

Commit

Permalink
v1.0.3
Browse files Browse the repository at this point in the history
- update rdme
- update v:publish
- add dist “js & css” files for quick testing
- cleanup media view
  • Loading branch information
ctf0 committed Aug 3, 2017
1 parent 0191df3 commit 8344a6b
Show file tree
Hide file tree
Showing 7 changed files with 28,394 additions and 471 deletions.
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@

`php artisan vendor:publish --provider="ctf0\MediaManager\MediaManagerServiceProvider"`

- install javascript dependencies

```bash
yarn add vue dropzone keycode vue-tippy vue2-filters vue-lightbox vuemit
# or
npm install vue dropzone keycode vue-tippy vue2-filters vue-lightbox vuemit
```

- for styling we use ***bulma*** so install it aswell, or [Use another Framework](#use-another-framework)

## Features

- multi
Expand Down Expand Up @@ -127,23 +117,34 @@ return [

## Usage

- add `new MediaRoutes();` to your route file, or under any route group ex.`admin`

\>\> **dont forget to update the `root_url`** <<
- package automatically appends routes to `routes/web.php`
- package automatically appends assets compiling to `webpack.mix.js`
- add `MIX_MM_FRAMEWORK=bulma` to `.env`

- to provide as much flexibility as possible, edit the `views/vendor/MediaManager/(framework)/media` file and let it extend from your main layout.
- add `MIX_MM_FRAMEWORK=bulma` to your `.env` file.
- run `npm run watch` to compile your `js/css` files.
#### - Simple
- visit `http://127.0.0.1:8000/media`

#### Use another Framework
#### - Advanced
- install javascript dependencies

- duplicate `views/vendor/MediaManager/bulma` and rename it to the framework you want ex.`bootstrap`
- duplicate `assets/vendor/MediaManager/js/components/bulma-notif` and rename it to the framework you want ex.`bootstrap-notif`
- duplicate `assets/vendor/MediaManager/sass/bulma` and rename it to the framework you want ex.`bootstrap`
- set `MIX_MM_FRAMEWORK` to the framework name ex.`MIX_MM_FRAMEWORK=bootstrap`
- start editing the new files.
```bash
yarn add vue dropzone keycode vue-tippy vue2-filters vue-lightbox vuemit
# or
npm install vue dropzone keycode vue-tippy vue2-filters vue-lightbox vuemit
```

after you are done, maybe you can send me a PR so everyone else can benefit from it :trophy:
- for styling we use ***bulma***

> ***Or Use another Framework***
>
> - duplicate `views/vendor/MediaManager/bulma` and rename it to the framework you want ex.`bootstrap`
> - duplicate `assets/vendor/MediaManager/js/components/bulma-notif` and rename it to the framework you want ex.`bootstrap-notif`
> - duplicate `assets/vendor/MediaManager/sass/bulma` and rename it to the framework you want ex.`bootstrap`
> - set `MIX_MM_FRAMEWORK` to the framework name ex.`MIX_MM_FRAMEWORK=bootstrap`
> - start editing the new files.
> - run `npm run watch` to compile your `js/css` files.
>
> after you are done, maybe you can send me a PR so everyone else can benefit from it :trophy:
## ToDo "ANY HELP IS DEEPLY APPRECIATED"

Expand Down
14 changes: 14 additions & 0 deletions src/MediaManagerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public function boot()
__DIR__.'/config' => config_path(),
], 'config');

// public
$this->publishes([
__DIR__.'/dist' => public_path('assets/vendor/MediaManager'),
], 'dist');

// resources
$this->publishes([
__DIR__.'/resources/assets' => resource_path('assets/vendor/MediaManager'),
Expand All @@ -34,6 +39,15 @@ public function boot()
__DIR__.'/resources/views' => resource_path('views/vendor/MediaManager'),
], 'view');

// routes
$route_file = base_path('routes/web.php');
$search = 'MediaManager';
if (File::exists($route_file) && !str_contains(File::get($route_file), $search)) {
$data = "\n// Media-Manager\nnew \ctf0\MediaManager\MediaRoutes();";

File::append($route_file, $data);
}

// mix
$mix_file = base_path('webpack.mix.js');
$search = 'MediaManager';
Expand Down
Loading

0 comments on commit 8344a6b

Please sign in to comment.