├── install-stubs ├── resources │ ├── js │ │ └── admin │ │ │ ├── index.js │ │ │ ├── app-components │ │ │ ├── Form │ │ │ │ ├── AppForm.js │ │ │ │ └── AppUpload.js │ │ │ ├── Listing │ │ │ │ └── AppListing.js │ │ │ └── bootstrap.js │ │ │ ├── admin.js │ │ │ └── bootstrap.js │ ├── sass │ │ └── admin │ │ │ ├── styles │ │ │ └── _index.scss │ │ │ ├── vendor │ │ │ └── _index.scss │ │ │ ├── admin.scss │ │ │ └── _variables.scss │ └── views │ │ ├── admin │ │ └── layout │ │ │ ├── profile-dropdown.blade.php │ │ │ ├── sidebar.blade.php │ │ │ └── logo.blade.php │ │ └── vendor │ │ └── mail │ │ └── html │ │ └── themes │ │ └── default.css ├── partial-webpack.mix.js ├── webpack.mix.js ├── database │ └── migrations │ │ └── create_wysiwyg_media_table.php └── config │ └── wysiwyg-media.php ├── .gitignore ├── resources ├── views │ └── admin │ │ ├── partials │ │ ├── main-bottom-scripts.blade.php │ │ ├── main-styles.blade.php │ │ ├── footer.blade.php │ │ ├── header.blade.php │ │ └── wysiwyg-svgs.blade.php │ │ ├── includes │ │ ├── avatar-uploader.blade.php │ │ └── media-uploader.blade.php │ │ └── layout │ │ ├── master.blade.php │ │ └── default.blade.php └── lang │ ├── sk │ └── admin.php │ └── en │ └── admin.php ├── tests ├── fixtures │ ├── resources │ │ └── views │ │ │ └── admin │ │ │ └── test │ │ │ └── index.blade.php │ └── public │ │ └── mix-manifest.json ├── Feature │ └── SimpleAdminTest.php └── TestCase.php ├── routes └── web.php ├── src ├── WysiwygMedia.php ├── Traits │ └── HasWysiwygMediaTrait.php ├── Http │ └── Controllers │ │ └── WysiwygMediaUploadController.php ├── AdminUIServiceProvider.php └── Console │ └── Commands │ └── AdminUIInstall.php ├── README.md ├── phpunit.xml ├── LICENSE └── composer.json /install-stubs/resources/js/admin/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | composer.lock 3 | .idea/ 4 | .DS_Store 5 | .phpunit.result.cache 6 | -------------------------------------------------------------------------------- /install-stubs/resources/sass/admin/styles/_index.scss: -------------------------------------------------------------------------------- 1 | // Write (or import) your styles here -------------------------------------------------------------------------------- /resources/views/admin/partials/main-bottom-scripts.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/admin/partials/main-styles.blade.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /install-stubs/resources/sass/admin/vendor/_index.scss: -------------------------------------------------------------------------------- 1 | // Import here any vendor styles (e.g. from node_modules) 2 | @import "~craftable/scss/app"; -------------------------------------------------------------------------------- /install-stubs/resources/js/admin/app-components/Form/AppForm.js: -------------------------------------------------------------------------------- 1 | import { BaseForm } from 'craftable'; 2 | 3 | export default { 4 | mixins: [BaseForm] 5 | }; -------------------------------------------------------------------------------- /install-stubs/resources/js/admin/app-components/Listing/AppListing.js: -------------------------------------------------------------------------------- 1 | import { BaseListing } from 'craftable'; 2 | 3 | export default { 4 | mixins: [BaseListing] 5 | }; -------------------------------------------------------------------------------- /install-stubs/resources/js/admin/app-components/Form/AppUpload.js: -------------------------------------------------------------------------------- 1 | import { BaseUpload } from 'craftable'; 2 | 3 | Vue.component('media-upload', { 4 | mixins: [BaseUpload] 5 | }); -------------------------------------------------------------------------------- /install-stubs/resources/js/admin/app-components/bootstrap.js: -------------------------------------------------------------------------------- 1 | import { Auth, TranslationForm, TranslationListing } from 'craftable'; 2 | import './Listing/AppListing'; 3 | import './Form/AppUpload'; -------------------------------------------------------------------------------- /install-stubs/resources/sass/admin/admin.scss: -------------------------------------------------------------------------------- 1 | // Variables 2 | @import "variables"; 3 | 4 | // Vendor 5 | @import "vendor/index"; 6 | 7 | // Your own, project specific styles 8 | @import "styles/index"; -------------------------------------------------------------------------------- /tests/fixtures/resources/views/admin/test/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('brackets/admin-ui::admin.layout.default') 2 | 3 | @section('body') 4 | 5 | Here should be some custom code :) 6 | 7 | @endsection -------------------------------------------------------------------------------- /tests/fixtures/public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/admin.js": "/js/admin.js", 3 | "/js/app.js": "/js/app.js", 4 | "/css/app.css": "/css/app.css", 5 | "/css/admin.css": "/css/admin.css" 6 | } -------------------------------------------------------------------------------- /install-stubs/partial-webpack.mix.js: -------------------------------------------------------------------------------- 1 | mix 2 | .js(["resources/js/admin/admin.js"], "public/js") 3 | .sass("resources/sass/admin/admin.scss", "public/css") 4 | .vue(); 5 | 6 | if (mix.inProduction()) { 7 | mix.version(); 8 | } -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | group(function () { 4 | Route::namespace('Brackets\AdminUI\Http\Controllers')->group(function () { 5 | Route::post('/admin/wysiwyg-media','WysiwygMediaUploadController@upload')->name('brackets/admin-ui::wysiwyg-upload'); 6 | }); 7 | }); -------------------------------------------------------------------------------- /install-stubs/resources/views/admin/layout/profile-dropdown.blade.php: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /resources/views/admin/partials/footer.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/WysiwygMedia.php: -------------------------------------------------------------------------------- 1 | file_path); 18 | }); 19 | } 20 | 21 | public function wysiwygable(): MorphTo 22 | { 23 | return $this->morphTo(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /install-stubs/webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel applications. By default, we are compiling the CSS 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix 15 | .js(["resources/js/admin/admin.js"], "public/js") 16 | .sass("resources/sass/admin/admin.scss", "public/css") 17 | .vue(); 18 | 19 | if (mix.inProduction()) { 20 | mix.version(); 21 | } -------------------------------------------------------------------------------- /tests/Feature/SimpleAdminTest.php: -------------------------------------------------------------------------------- 1 | visit('/admin/test/index'); 15 | 16 | $this->assertStringContainsString("