Download the PHP package bwt-team/laravel-api without Composer

On this page you can find all versions of the php package bwt-team/laravel-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-api

English description | Russian description

Laravel 5 API

Latest Stable Version Latest Unstable Version

This package allows to easily and quickly setup basics for API.

Content

Installation

Install this package with composer using the following command:

Setup in Laravel

When composer updated, add service provider into providers array in config/app.php.

This service provider will register api macros for more comfortable work. You will have the following format of call available in api format:

In full format it will look as following:

Also, this service provider will allow to publish config file in order to update package settings according to your needs. Use the following command for publication:

To make all responses (including alerts etc) be sent in the same format, change class parent to \BwtTeam\LaravelAPI\Exceptions\Handler in App\Exceptions\Handler class

And middleware \BwtTeam\LaravelAPI\Middleware\Api should be connected to specific path (or the whole app) to make this path be handled as API method.

If you are using App\Http\Requests class instances for validation, you need to inherit from BwtTeam\LaravelAPI\Requests\ApiRequest, rather than Illuminate\Foundation\Http\FormRequest.

Setup in Lumen

After composer update register a service provider, by adding the following lines into bootstrap/app.php:

Copy config file vendor/bwt-team/laravel-api/config/api.php into config directory, which is stored in root directory (or create it yourself if it is missing) and set it up according to your needs. To load settings from this file in bootstrap/app.phpadd the following lines:

To make all responses (including alerts etc) be sent in the same format, change class parent to BwtTeam\LaravelAPI\Exceptions\LumenHandler in App\Exceptions\Handler

And middleware \BwtTeam\LaravelAPI\Middleware\Api should be connected to specific path (or the whole app) to make this path be handled as API method.

License

This package is using MIT.


All versions of laravel-api with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0.2
illuminate/http Version ^9.0
illuminate/support Version ^9.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bwt-team/laravel-api contains the following files

Loading the files please wait ....