A Laravel back-end & Vue front-end starter kit with registration, login, authentication & logout (laravel/sanctum, Vue router, Vuex, Axios & Interceptor )
- Node JS - version 14+
- PHP - version 7+
- Laravel - version 8+
Clone the repository: (You may use ssh or github cli)
https://github.com/nazmussakib44/laravel-vue-starter-kit.git
Go to starter backend folder and edit .env file to connect your database.
You may find env.example file just rename it to .env file and connect your database.
cd starter-backend
Open .env file and edit
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=starter // add your database name
DB_USERNAME=root // your username
DB_PASSWORD=root //your password
Install composer
composer install
Run backend
php artisan serve
You should see the running url like -
Go to frontend folder
cd starter-frontend
npm install --legacy-peer-deps
Open config.js file and change apiUrl based on your environment
const env = 'dev'; //change it to const env = 'prod'; for build and run command npm run build
const dev = {
apiUrl: 'http://127.0.0.1:8000', //for development environment
env: env
};
const prod = {
apiUrl: 'https://cloud.net.au', //for production environment
env: env
};
const config = {
dev,
prod
};
module.exports = config[env];
Run the front-end
npm run serve
!!!And you are ready to go!!!
MIT