Laravelvue Boilerplate screenshot

Laravelvue Boilerplate

Author Avatar Theme by Danielcharrua
Updated: 2 Aug 2020
10 Stars

This project is a starting point for creating a Vue.js SPA that consumes authenticated API requests built on Laravel 6.0.

Categories

Overview:

The Vue SPA + Laravel API Boilerplate is a project that provides a solid starting point for developers looking to create a Vue.js single-page application (SPA) that consumes authenticated API requests. The boilerplate is built on Laravel 6.0 and utilizes Passport for API authentication. It is important to note that the accompanying articles providing step-by-step instructions for creating this repository are written in Spanish.

Features:

  • Vue.js SPA: The boilerplate is built with Vue.js, a popular JavaScript framework for building user interfaces. This allows for dynamic and reactive components in the SPA.
  • Laravel API: The API is built on Laravel 6.0, a powerful PHP framework known for its elegant syntax and extensive feature set. It provides flexible routing, database access and various other functionalities for the API.
  • Passport Authentication: API authentication is handled using Laravel Passport, a full OAuth2 server implementation. This allows developers to easily integrate authentication into their API endpoints.
  • Step-by-Step Instructions: The accompanying articles provide detailed guides in Spanish for creating both the Laravel API and Vue SPA. These guides cover all the necessary steps to set up the boilerplate.

Installation:

To install the Vue SPA + Laravel API Boilerplate, follow these steps:

  1. Clone the repository:
git clone [repository_url]
  1. Navigate to the project directory:
cd [project_directory]
  1. Install the required dependencies:
npm install       # Install dependencies for Vue SPA
composer install  # Install dependencies for Laravel API
  1. Configure the database by copying the example configuration file:
cp .env.example .env

Make necessary changes to the .env file to match your database settings.

  1. Generate an application key:
php artisan key:generate
  1. Migrate the database:
php artisan migrate
  1. Install Passport and set up the encryption keys:
php artisan passport:install
  1. Compile the frontend assets:
npm run dev       # Development mode
npm run prod      # Production mode (minified)
  1. Start the development server:
php artisan serve

The application should now be accessible at http://localhost:8000.

Summary:

The Vue SPA + Laravel API Boilerplate is a helpful starting point for developers who want to create a Vue.js SPA that consumes authenticated API requests. With its integration of Laravel 6.0 and Laravel Passport, it provides a robust foundation for building secure and efficient applications. The step-by-step guides provided in the accompanying Spanish articles make it easier for developers to set up the repository and get started with their projects.