In this article, we’re going to set up a Laravel API with Angular Material for the front end. We’re also going to follow best practices that will help us scale with the number of developers working on the project and the complexity behind it. Most tutorials cover this topic from another perspective - they completely forget about scaling. While this tutorial is not targeted at small todo apps, it is extremely helpful if you’re planning to work with other developers on a big project.
Here’s a demo built with Laravel and Angular Material.
Setting up Laravel
Creating a project
We’re going to start by pulling in the latest Laravel - 5.1 at the time of writing.
composer create-project laravel/laravel myapp --prefer-dist
Configuring the environment
All the consequent commands will be ran inside the myapp
directory. Throughout the remainder of this tutorial, we’ll assume you’re running a Linux environment if you’re following along. If you aren’t you’re encouraged to install Homestead Improved as a virtual Linux environment in which to follow along.
cd myapp
Next, we’re going to update our .env
file with the database connection credentials:
DB_HOST=localhost
DB_DATABASE=your-db-name
DB_USERNAME=your-username
DB_PASSWORD=your-password
Once your app has been configured, you should see the Laravel 5 greeting page.
Continue reading %Flexible and Easily Maintainable Laravel + Angular Material Apps%
by Jad Joubran via SitePoint
No comments:
Post a Comment