Download the PHP package lake/laravel-admin-lapi without Composer

On this page you can find all versions of the php package lake/laravel-admin-lapi. 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-lapi

Api授权管理

项目介绍

签名算法

使用方法

php artisan admin:import lapi


*  导入路由信息,解析api控制器注释

php artisan lapi:import-route


### 请求示例 

*  GET 请求

GET: https://yourdomain.com/api/aaa?app_id=API2020091315292812159&name=aaa&nonce_str=SNejQr2b9RdF1CH1&sign=B28ED49A3EF7CEB615AE735608039562×tamp=1600095342


*  POST 请求

POST: https://yourdomain.com/api/aaa body: { "app_id": "API2020091315292812159", "timestamp": 1600095789, "nonce_str": "035tdGRU3i4yeb38", "name": "aaa", "sign": "36316F06DE635AD51C182C8D5E7495F0" }


### `JSON` 输出格式自定义 

*  如果输出的json格式和需要的格式不一致,可以覆盖绑定默认json响应
*  可以在 `\App\Providers\AppServiceProvider` 内或者其他服务提供者处添加以下代码

$this->app->bind(\Lake\Admin\Lapi\Contracts\Response::class, YourResponse::class);

*  使用json响应

app('lapi.json')->json(boolen $success, int $code, string|null $msg, array|null $data);


### 模块内 `api` 文件方法注释

*  方法注释

### 模块内使用 

*  `trait` 引用

use Lake\Admin\Lapi\Traits\Lapi as LapiTrait;

class Index { use LapiTrait;

// 初始化
protected function __contruct()
{
    // $this->withData($data); // 自定义签名数据,非必须

    $this->checkApi();
}

}


*  `控制器中间件` 使用

在使用中间件的位置引入

\Lake\Admin\Lapi\Middleware\Lapi::class

或者

api.lapi


注意:如需自定义签名数据,可以在使用中间件之前添加 `app('lapi.check')->withData($data);`

### 开源协议

*  `laravel-admin-lapi` 遵循 `Apache2` 开源协议发布,在保留本扩展版权的情况下提供个人及商业免费使用。 

### 版权

*  该系统所属版权归 deatil(https://github.com/deatil) 所有。

All versions of laravel-admin-lapi with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
encore/laravel-admin Version 1.8.*
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 lake/laravel-admin-lapi contains the following files

Loading the files please wait ....