
Symfony 4 skeleton with VueJs, Vuex, Vue-router and Webpack !
Report Bug
·
Request Feature
Table of Contents
I wanted a skeleton with an API made with Symfony and a front with VueJs but I didn't find one that really suited my needs on Github so I created this enhanced one.
-
composer
-
npm
npm install npm@latest -g
- Install composer and node dependencies
$ composer install $ yarn install #recommended or $ npm install
- Migrate database and fixtures
$ php bin/console make:migration $ php bin/console doctrine:migrations:migrate $ php bin/console doctrine:fixtures:load
- Compile JS and CSS files
$ ./node_modules/.bin/encore dev
- Execute built in Symfony web server
$ php bin/console server:run
or
- If you use Docker
$ docker-compose up
Vue files are located at /assets/js folder. Just modify these files as a regular Vue project.
I suggest you using hot-reload encore server. When a file is updated webpack will be launched automatically. Start it with this command
$ ./node_modules/.bin/encore dev --watch
Files app.js and app.css will be compiled at /public/build folder.
Default controller contains just one root route that renders this necessary files.
SassLoader is activated, so all changes on /assets/js/app.scss will be compiled too.
Axios are prototyped as $http. This service will be available at the whole Vue app.
Vuex and Vue-router are included too. Be free to add as routes and stores as you want.
Thanks to fixtures, a test account can be create :
admin@exemple.com
1234
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.md
for more information.
Clemissile - @clemissile - ganivetclement@gmail.com
Project Link: https://github.com/clemissile/symfony-vue-starter