Vadim
Vadim

Reputation: 569

Laravel Bootstrap scaffolding to VUE scaffolding - how to?

if i created my Laravel project with Bootstrap scaffolding, using this command:

php artisan ui bootstrap

Do i need to create new/fresh Laravel project to use VUE scaffolding, or it's possible to convert Bootstrap scaffolding project to VUE scaffolding project?

Is it safe to run this command:

php artisan ui vue

on top of Laravel project, to convert it to VUE scaffolding?

Upvotes: 0

Views: 557

Answers (1)

Salim Djerbouh
Salim Djerbouh

Reputation: 11034

Short answer, Yes it is safe

You can have an existing scaffolded project with Bootstrap and install vue scaffolding (even with auth) and compile and run safely because Vue scaffolding includes Twitter Bootstrap library by default in bootstrap.js

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');

    require('bootstrap');
} catch (e) {}

And all authentication and layout views are designed with the TWBS classes

Pro Tip

If you want to test things on important project without messing things out, you can create a new git branch

git branch testing-vue-scaffolding
git checkout testing-vue-scaffolding

And tinker around however you like, and revert back the changes if they got messed up

I have two cool shell aliases to do this quickly

alias nah="git clean -df && git checkout -- . && git reset --hard HEAD"
alias wip="git add . && git commit -s -S -m 'Work In Progress' -m 'This is a trash commit to save changes'"

Save the changes with wip and whenever you feel things are messed up, just run nah to go back

Hope this helps

Upvotes: 1

Related Questions