This post is from the professional Laravel developer community, original link: learnku.com/laravel/t/3…
introduce
A few months ago I was trying to find a new solution for my project and I had built a single page application using Vue (using this great framework, using Laravel Lumen as API gateway and Laravel Passport as SSO server). After a few weeks of work, I found that the framework had some limitations, especially in terms of deployment and hard to open source (because there are so many components involved, CORS setup…). . Then one day I had a new idea:
Why didn’t we use VueJS built into Laravel to build the SPA dashboard?
Laravel + VueJS = Laravue
Example: laravue.dev Document: doc.laravue.dev
Laravue is a beautiful vue-element-admin inspired dashboard. It provides all the components necessary to build enterprise applications, allowing administrators to control the business and manage others. My plan is to apply the latest Laravel/Vue technology/libraries/components to the project and be easy to use. In this example, the API is provided by Laravel, and most of it is fake – but easy to implement.
start
Clone the project using Composer
composer create-project tuandm/laravue
cd laravue
Migrate data (after setting database information in the.env file)
php artisan migrate --seed
Generate the JWT secret key
php artisan jwt:secret
# install dependencies
yarn install
# Build (development environment)
yarn run dev # 或者 yarn run watch
# Start local service
php artisan serve
Copy the code
The next step
-
The project is under heavy development and has not yet been built as a Laravel plug-in (it should be). The next step will be to build this project as a standalone Laravel plug-in that will integrate the existing Laravel web site.
-
Provide complete documentation and strict code specifications. PHP/Laravel has an excellent code specification for PSR and VueJS has a good standard here but this is too basic and not enough.
-
Perfect testing.