Scafold Vue Components easily on Laravel

Emmanuel Paul Mnzava.
1 min readSep 5, 2021

--

Hello everyone,

Been using vue js and Livewire alot lately to create dynamic reusable components.

While using Vue in Laravel i realized that i can easily save time in creating various Vue components by just running a command, That will end up scafolding the Vue components for me.

php artisan make:vue-component DatePickerComponent

The above command will generate an empty Vue component under.

resources/js/components/<template><!-- Your DatePickerComponent component--></template><script>export default {data() {return {//};}}</script>

This can be compared to other scafolding commands such as

php artisan make:controller

To have access to such commands on your Laravel project please install the following package which is maintained on this repo

Installation

composer require epmnzava/laravel-vue-component

usage

php artisan make:vue-component YourComponentName

Before you go… Thanks for reading the article! If you enjoyed it, please don’t forget to show your appreciation by clicking 👏 below!

Any questions or comments hit me up on

Mail: epmnzava@gmail.com

Twitter: https://twitter.com/epmnzava

Github: https://github.com/dbrax

--

--

Emmanuel Paul Mnzava.

Software Engineer and techprenuer with passion of helping entreprenuers and small businesses using Technology.