Download the PHP package mr-timofey/laravel-admin-api without Composer

On this page you can find all versions of the php package mr-timofey/laravel-admin-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-admin-api

API backend for administration panels based on vue-admin-front package.

Demo.

Requirements

Install

Follow installation instructions from dependent packages: mr-timofey/laravel-aio-images for images processing, mr-timofey/laravel-simple-tokens for authorization.

For Laravel <= 5.4 add MrTimofey\LaravelAdminApi\ServiceProvider to your app.providers config.

Look to config/admin_api.php for further package configuration instructions.

Follow vue-admin-front quick start guide.

For development purpose you may also want to execute npm i -D concurrently and add this script to your npm scripts:

It will run a development PHP server on port 8000 and vue-admin-front dev server on port 8080.

Authentication and authorization

This package uses mr-timofey/laravel-simple-tokens to maintain authentication and authorization logic.

You can change a guard which is used for API by setting a proper auth:{guard name} middleware and guard name in admin_api.api_middleware and admin_api.api_guard config respectively.

Remove auth middleware if you want to disable authorization.

Also you can completely replace authentication and authorization logic by rebinding auth controller class: app()->bind(\MrTimofey\LaravelAdminApi\Http\Controllers\Auth::class, YourController::class)

Models configuration

Admin API will try to guess attribute types and generate field names by capitalizing attribute names using model's:

You can also implement a MrTimofey\LaravelAdminApi\Contracts\ConfiguresAdminHandler interface and define a configureAdminHandler($handler) method to make things more controllable.

Available field types and their options are described in vue-admin-front field types docs. Same for fields formatting for model index page vue-admin-front display types docs.

Usage example:

Events

Every action within an administrative panel can be tracked and processed with the Laravel's event system. Available events:

Tracking changes for ModelUpdated event

By default ModelUpdated will track only instance attributes (using Eloquent's Model::getDirty()) method and relation changes.

You can implement MrTimofey\LaravelAdminApi\Contracts\HasCustomChanges interface and define getCustomChanges() method to enrich ModelUpdated::$changes field with any additional information you want to track. Default format is to return array ['field_name' => [$oldValue, $newValue], ...].


All versions of laravel-admin-api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
mr-timofey/laravel-aio-images Version 0.*
mr-timofey/laravel-simple-tokens Version 0.*
ext-json Version *
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 mr-timofey/laravel-admin-api contains the following files

Loading the files please wait ....