Docs
Docs

Upgrade guide

Upgrading from version 2.x

To upgrade to version 3 follow the below steps:

Fresh install of version 3

Start by creating a new installation in a brand new folder and then copy your application's unique files from the old app to the new one. Make sure to read the rest of the upgrade guide before you start the upgrade process.

Angular Material 1.0

Angular material has been upgraded to 1.0. This is not backwards compatible since the API for angular material was not stable before 1.0 (as per the semver specifications). Refer to Angular Material's changelog for information on breaking changes.
You could also manually edit the bower.json and install the specific version of angular material that you were using.

Angular code style

We're now following John Papa's angular style guide everywhere in our app (generators, demo code). This is a style guide endorsed by the Angular team, which means it's okay to give it some time and familiarize yourself with the syntax.
However it's only a style guide, and you don't have to follow it.

Also jshint was replaced by eslint. The default eslint configuration available at .eslintrc promotes John Papa's style guide.

Demo

All the demo functionality has been grouped into 1 page (Landing) and 2 directives (header & footer) to make it easier to remove the demo-specific code. This also means, that if your previous code is still relying on Prism (which was used for the demo syntax highlighting), you need to manually remove it. Just run a quick search in project for Prism, and make sure to remove all its occurrences.

Response Macros

If you were using response macros, you need to either adjust them in App\Providers\ResponseMacroServiceProvider.php or update any piece of code (front-end/clients) that depend on your API.

Restangular

As noted in the Restangular docs page, the direct use of the Restangular object is not recommended anymore.
We recommend the use of the API service instead, which is an instance of the Restangular service.
This makes it easier for you to create other services with different configurations, should you wish to communicate with other APIs.

Routes.php

You no longer need to add the full namespace of your controllers in App\Http\Routes.php.

For example:

<?php

//full namespace (needs to be upgraded)
$api->post('users/login', 'App\Http\Controllers\LoginController@login');

//becomes
$api->post('users/login', 'LoginController@login');

👍

Version 3.0 Changelog

It is recommended that you carefully read the changelog for version 3.0.0 so you can get to know most of the new features included in version 3.0