Skip to content

Installation

Ajay Kumar Choudhary edited this page Feb 11, 2022 · 15 revisions

Requirements

This package has been tested with PHP versions 5.6 - 8.0 (basically those that Laravel supports). It has been developed targeting Laravel 5.x, Laravel 6., Laravel 7., Laravel 8.* and tested on Laravel 7.* and Laravel 8.*. Laravel 8 version is the latest version.

Installation

  1. If you are running Laravel 8 or above add this line to composer.json:
"require": {
    "froiden/laravel-rest-api": "^8.0"
}
  1. If you are running Laravel 7 or above add this line to composer.json:
"require": {
    "froiden/laravel-rest-api": "^7.0"
}
  1. If you are running Laravel 6 or above add this line to composer.json:
"require": {
    "froiden/laravel-rest-api": "^6.0"
}
  1. If you are running Laravel 5.8 or above but below laravel 6 add this line to composer.json:
"require": {
    "froiden/laravel-rest-api": "^5.0"
}
  1. If you are running Laravel 5.6 or 5.7 add this line to composer.json:
"require": {
    "froiden/laravel-rest-api": "^4.0"
}
  1. If you are running Laravel 5.5 add this line to composer.json:
"require": {
    "froiden/laravel-rest-api": "^3.0"
}
  1. If you are running Laravel 5.4 add this line instead:
"require": {
    "froiden/laravel-rest-api": "^2.0"
}
  1. If you are running Laravel 5.3 add this line instead:
"require": {
    "froiden/laravel-rest-api": "^1.0"
}
  1. If you are running Laravel 5.2 or lower:
"require": {
    "froiden/laravel-rest-api": "^0.0"
}
  1. Run composer update

  2. Add service provider and facade alias in app.php

'providers' => [
    ...
    \Froiden\RestAPI\Providers\ApiServiceProvider::class
    ...
];

'alias' => [
    ...
    "ApiRoute" => \Froiden\RestAPI\Facades\ApiRoute::class
    ...
];