安装dingo

To install this package you will need:
Laravel 5.1+ or Lumen 5.1+
PHP 5.5.9+

You must then modify your composer.json
file and run composer update
to include the latest version of the package in your project.
"require": { "dingo/api": "1.0.*@dev"}

Or you can run the composer require
command from your terminal.
composer require dingo/api:1.0.x@dev

At this time the package is still in a developmental stage and as such does not have a stable release. You may need to set your minimum-stability
to dev
.

Once the package is installed the next step is dependant on which framework you're using.
[

](https://github.com/dingo/api/wiki/Installation#laravel)Laravel
Open config/app.php
and register the required service provider above your application providers.
'providers' => [ Dingo\Api\Provider\LaravelServiceProvider::class]

If you'd like to make configuration changes in the configuration file you can pubish it with the following Aritsan command:
php artisan vendor:publish --provider="Dingo\Api\Provider\LaravelServiceProvider"

[

](https://github.com/dingo/api/wiki/Installation#lumen)Lumen
Open bootstrap/app.php
and register the required service provider.
$app->register(Dingo\Api\Provider\LumenServiceProvider::class);

[

](https://github.com/dingo/api/wiki/Installation#facades)Facades
There are two facades shipped with the package. You can add either of them should you wish.
[

](https://github.com/dingo/api/wiki/Installation#dingoapifacadeapi)Dingo\Api\Facade\API

This is a facade for the dispatcher, however, it also provides helper methods for other methods throughout the package.
[

](https://github.com/dingo/api/wiki/Installation#dingoapifacaderoute)Dingo\Api\Facade\Route

This is a facade for the API router and can be used to fetch the current route, request, check the current route name, etc.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • PLEASE READ THE FOLLOWING APPLE DEVELOPER PROGRAM LICENSE...
    念念不忘的阅读 14,598评论 5 6
  • afinalAfinal是一个android的ioc,orm框架 https://github.com/yangf...
    passiontim阅读 15,744评论 2 45
  • Awesome Ruby Toolbox Awesome A collection of awesome Ruby...
    debbbbie阅读 8,011评论 0 3
  • 在图书馆借书的时候遇上一个长发姑娘,不到160cm的身高却有着到了大腿的长发,头发呈亚麻色,那种柔顺让人瞬间想起指...
    鱼婂婂阅读 4,821评论 5 7
  • 1.天然补肾——山药 山药被称为“白人参”,它强大的保健功效是很多药材都无法替代的,中医上将它称为上品之药,可补脾...
    Youxh阅读 2,144评论 0 1

友情链接更多精彩内容