diff --git a/README.md b/README.md index 32ea4a2..e121543 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,29 @@ -**Sorry no time to mantain this package: if anyone is interested to mantain it please email me at sergiturbadenas at gmail.com** - -# Laravel 5.5+ Frontend preset for Vuetify with Vuex +# Laravel 7.0+ Frontend Ui for Vuetify with Vuex A Laravel front-end scaffolding preset for [Vuetify](https://vuetifyjs.com/en/) - a Material Design Component Framework with Vue and Vuex. ## Usage -1. Fresh install Laravel 5.5+ and cd to your app: `laravel new app && cd app` -2. Install this preset via `composer require laravel-frontend-presets/vuetify`. Laravel 5.5+ will automatically discover this package. No need to register the service provider. -3. Use `php artisan preset vuetify` for the basic Vuetify frontend preset OR use `php artisan preset vuetify-auth` for the basic preset auth scaffolding in one go. (NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in `routes/web.php`) -4. `npm install` -5. `npm run dev` -6. Configure your favorite database (mysql, sqlite etc.) -7. `php artisan migrate` to create basic user tables. -9. This packages requires [Laravel Passport](https://laravel.com/docs/passport). Run `php artisan passport:install` -8. `php artisan serve` (or equivalent) to run server and test preset. +1. Fresh install Laravel 7.0+ and cd to your app: `laravel new app && cd app` +2. Install this preset via `composer require laravel-frontend-presets/vuetify`. Laravel 5.0+ will automatically discover this package. No need to register the service provider. For the moment laravel-frontend-presets/vuetify est juste available with laravel 5.0+ +4. If your need it for you laravel 7, you can add this on your composer.json + ``` + "repositories": [{ "type": "vcs", "url": "https://github.com/yagami271/laravel-vuetify" }], + "require": { "laravel-frontend-presets/vuetify": "dev-master", } + + and run composer update + ``` + +5. composer require laravel/ui +6. Use `php ui vuetify` +7. `composer require laravel/passport` +8. `php artisan migrate` +9. `php ui vuetify vuetify-auth` +10. `npm install` +11. `npm run dev` +12. Configure your favorite database (mysql, sqlite etc.) +13. This packages requires [Laravel Passport](https://laravel.com/docs/passport). Run `php artisan passport:install` +14. `php artisan serve` (or equivalent) to run server and test preset. ### Demo site: diff --git a/composer.json b/composer.json index 621c3f5..c9657b5 100644 --- a/composer.json +++ b/composer.json @@ -1,21 +1,21 @@ { "name": "laravel-frontend-presets/vuetify", - "description": "Laravel 5.5+ Front-end preset for vuetify", + "description": "Laravel 7.0+ Front-end preset for vuetify", "keywords": ["laravel", "preset", "vuetify"], "license": "MIT", "require": { - "laravel/framework": "^5.7", - "laravel/passport": "^7.0" + "laravel/framework": "^7.5.2", + "laravel/passport": "^8.0.2" }, "autoload": { "psr-4": { - "LaravelFrontendPresets\\Vuetify\\": "src/" + "LaravelFrontendUi\\Vuetify\\": "src/" } }, "extra": { "laravel": { "providers": [ - "LaravelFrontendPresets\\Vuetify\\VuetifyPresetServiceProvider" + "LaravelFrontendUi\\Vuetify\\VuetifyUiServiceProvider" ] } } diff --git a/src/VuetifyPresetServiceProvider.php b/src/VuetifyPresetServiceProvider.php index 341b930..2c9e43a 100644 --- a/src/VuetifyPresetServiceProvider.php +++ b/src/VuetifyPresetServiceProvider.php @@ -1,16 +1,16 @@ info('Vuetify scaffolding installed successfully.'); $command->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.'); }); - PresetCommand::macro('vuetify-auth', function ($command) { //optional - VuetifyPreset::install(true); + UiCommand::macro('vuetify-auth', function ($command) { //optional + VuetifyUi::install(true); $command->info('Vuetify scaffolding with Auth views installed successfully.'); $command->comment('Please run "npm install && npm run dev && php artisan passport:install" to compile your fresh scaffolding.'); }); diff --git a/src/VuetifyPreset.php b/src/VuetifyUi.php similarity index 80% rename from src/VuetifyPreset.php rename to src/VuetifyUi.php index 2488947..f03be6b 100644 --- a/src/VuetifyPreset.php +++ b/src/VuetifyUi.php @@ -1,17 +1,15 @@ deleteDirectory(base_path('node_modules')); + + $files->delete(base_path('yarn.lock')); + }); + } + + + /** * Update package array. * @@ -43,9 +84,11 @@ public static function install($withAuth = false) protected static function updatePackageArray(array $packages) { return array_merge([ - 'vuetify' => '^1.0', + 'vuetify' => '^2.1.13', 'gravatar' => '^1.0', - 'vuex' => '^3.0', + 'vue' => '^2.6.10', + 'vue-template-compiler' => '^2.6.10', + 'vuex' => "^3.1.2", ], Arr::except($packages, [ 'bootstrap', 'bootstrap-sass', diff --git a/src/vuetify-stubs/js/app.js b/src/vuetify-stubs/js/app.js index eb35ac6..947b155 100644 --- a/src/vuetify-stubs/js/app.js +++ b/src/vuetify-stubs/js/app.js @@ -1,4 +1,4 @@ - +import Vuetify from 'vuetify' /** * First we will load all of this project's JavaScript dependencies which * includes Vue and other libraries. It is a great starting point when @@ -15,9 +15,9 @@ window.Vue = require('vue'); * or customize the JavaScript scaffolding to fit your unique needs. */ -Vue.component('login-button', require('./components/LoginButtonComponent.vue')); -Vue.component('register-button', require('./components/RegisterButtonComponent.vue')); -Vue.component('snackbar', require('./components/SnackBarComponent.vue')); +Vue.component('login-button', require('./components/LoginButtonComponent.vue').default); +Vue.component('register-button', require('./components/RegisterButtonComponent.vue').default); +Vue.component('snackbar', require('./components/SnackBarComponent.vue').default); window.Vuetify = require('vuetify'); Vue.use(Vuetify) @@ -35,5 +35,6 @@ if (window.user ) { const app = new Vue({ el: '#app', - store + store, + vuetify: new Vuetify() }); diff --git a/src/vuetify-stubs/resources/js/app.js b/src/vuetify-stubs/resources/js/app.js index daec62d..c412429 100644 --- a/src/vuetify-stubs/resources/js/app.js +++ b/src/vuetify-stubs/resources/js/app.js @@ -1,4 +1,4 @@ - +import Vuetify from 'vuetify' /** * First we will load all of this project's JavaScript dependencies which * includes Vue and other libraries. It is a great starting point when @@ -15,12 +15,12 @@ window.Vue = require('vue'); * or customize the JavaScript scaffolding to fit your unique needs. */ -Vue.component('login-button', require('./components/LoginButtonComponent.vue')); -Vue.component('register-button', require('./components/RegisterButtonComponent.vue')); -Vue.component('remember-password', require('./components/RememberPasswordComponent.vue')); -Vue.component('reset-password', require('./components/ResetPasswordComponent.vue')); -Vue.component('snackbar', require('./components/SnackBarComponent.vue')); -Vue.component('gravatar', require('./components/GravatarComponent.vue')); +Vue.component('login-button', require('./components/LoginButtonComponent.vue').default); +Vue.component('register-button', require('./components/RegisterButtonComponent.vue').default); +Vue.component('remember-password', require('./components/RememberPasswordComponent.vue').default); +Vue.component('reset-password', require('./components/ResetPasswordComponent.vue').default); +Vue.component('snackbar', require('./components/SnackBarComponent.vue').default); +Vue.component('gravatar', require('./components/GravatarComponent.vue').default); window.Vuetify = require('vuetify'); Vue.use(Vuetify) @@ -40,6 +40,7 @@ if (window.user) { const app = new Vue({ el: '#app', store, + vuetify: new Vuetify(), mixins: [ withSnackbar ], data: () => ({ drawer: null, diff --git a/src/vuetify-stubs/resources/js/components/LoginButtonComponent.vue b/src/vuetify-stubs/resources/js/components/LoginButtonComponent.vue index 36a3d6e..54e7236 100644 --- a/src/vuetify-stubs/resources/js/components/LoginButtonComponent.vue +++ b/src/vuetify-stubs/resources/js/components/LoginButtonComponent.vue @@ -4,7 +4,10 @@ v-model="showLogin" persistent max-width="500px" :fullscreen="$vuetify.breakpoint.xsOnly"> - Login + + @@ -68,7 +71,8 @@ - + - +
+ - - - - - - - - - {{ config('app.shortname', 'Laravel') }} - -
- - notifications - - - - -
+ + {{ config('app.name') }} + @if (Route::has('login') && ! Auth::check() ) + + + + + + @endif - - - - - - - - -

@{{ user.name }}

- Change Avatar -
-
-
- - - - - - - - - - - save - Guardar - - - edit - Edit - - - exit_to_app - Logout - - - - - Change Password - - - - - Change Avatar - - -
-
- @yield('content') +
+ + + Vuetify.js +

Parallax Template

+
Powered by Vuetify
+ + Get Started + +
+
+
+ +
+ + +
+

The best way to start developing

+ + Cras facilisis mi vitae nunc + +
+
+ + + + + + + color_lens + + +
Material Design
+
+ + Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt ornare. + Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. + Nullam in aliquet odio. Aliquam eu est vitae tellus bibendum tincidunt. Suspendisse potenti. + +
+
+ + + + flash_on + + +
Fast development
+
+ + Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt ornare. + Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. + Nullam in aliquet odio. Aliquam eu est vitae tellus bibendum tincidunt. Suspendisse potenti. + +
+
+ + + + build + + +
Completely Open Sourced
+
+ + Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt ornare. + Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. + Nullam in aliquet odio. Aliquam eu est vitae tellus bibendum tincidunt. Suspendisse potenti. + +
+
+
+
+
+
+
+ +
+ + +
Web development has never been easier
+ Kick-start your application today + + Get Started + +
+
+
+ +
+ + + + + +
Company info
+
+ + Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt ornare. + Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. + Nullam in aliquet odio. Aliquam eu est vitae tellus bibendum tincidunt. Suspendisse potenti. + +
+
+ + + +
Contact us
+
+ + Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt ornare. + + + + + phone + + + 777-867-5309 + + + + + place + + + Chicago, US + + + + + email + + + john@vuetifyjs.com + + + +
+
+
+
+
+ + + + +
+ Made with + favorite + by Vuetify + and Costa Huang +
+
+
+
-
-@stack('beforeScripts') - - -@stack('afterScripts') + +
+ diff --git a/src/vuetify-stubs/resources/views/welcome.blade.php b/src/vuetify-stubs/resources/views/welcome.blade.php index 3accf7d..cf8e96d 100644 --- a/src/vuetify-stubs/resources/views/welcome.blade.php +++ b/src/vuetify-stubs/resources/views/welcome.blade.php @@ -6,7 +6,7 @@ - +