{"action":"created","issue":{"url":"https://api.github.com/repos/dingo/api/issues/398","labels_url":"https://api.github.com/repos/dingo/api/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/dingo/api/issues/398/comments","events_url":"https://api.github.com/repos/dingo/api/issues/398/events","html_url":"https://github.com/dingo/api/issues/398","id":77170183,"number":398,"title":"Lumen AND Laravel 5 Support","user":{"login":"jasonlewis","id":829059,"avatar_url":"https://avatars.githubusercontent.com/u/829059?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonlewis","html_url":"https://github.com/jasonlewis","followers_url":"https://api.github.com/users/jasonlewis/followers","following_url":"https://api.github.com/users/jasonlewis/following{/other_user}","gists_url":"https://api.github.com/users/jasonlewis/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonlewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonlewis/subscriptions","organizations_url":"https://api.github.com/users/jasonlewis/orgs","repos_url":"https://api.github.com/users/jasonlewis/repos","events_url":"https://api.github.com/users/jasonlewis/events{/privacy}","received_events_url":"https://api.github.com/users/jasonlewis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dingo/api/labels/notice","name":"notice","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":32,"created_at":"2015-05-17T00:38:34Z","updated_at":"2015-05-19T11:23:21Z","closed_at":null,"body":"Hello all, I've recently pushed quite a number of changes to the `develop` branch that allows you to use this package in your Lumen and Laravel 5 apps.\r\n\r\nYou can require it using `0.9.*@dev`.\r\n\r\nPlease note that if you're using Lumen you'll need to be using `lumen-framework 5.0.*@dev` for it to work correctly. These several routing changes that are yet to make it to a stable Lumen release.\r\n\r\nA few things to note...\r\n\r\n1. Much of the configuration can be done via environment variables now. You can still publish the config file in Laravel 5 and make changes that way. Lumen will require you to use the environment variables. For things that can't be set with environment variables there will be a method available on the underlying instance to change whatever it is you need.\r\n2. There is no internal dispatcher at this point in time. I was focusing on the core of the API for now to make that that's all sweet before moving on to the internal dispatcher.\r\n3. There is no route command at this point in time. It will be back.\r\n4. There is no URL generator at this point in time. it will be back.\r\n5. There's no facade at the moment. You will need to get an instance of the API router (`app('api.router')`) to register your routes.\r\n\r\nHere is a very quick sample of how it's now used. In your Lumen `bootstrap/app.php` file you'd register the Lumen provider.\r\n\r\n```php\r\n$app->register('Dingo\\Api\\Provider\\LumenServiceProvider');\r\n\r\n// Get an instance of the API router so we can use it in the routes.php file\r\n$api = $app['api.router'];\r\n```\r\n\r\nNow we can register our routes in the `routes.php` file.\r\n\r\n```php\r\n$api->version('v1', function ($api) {\r\n    $api->resource('users', 'UserController');\r\n});\r\n```\r\n\r\nAll routing methods available in L5 are available in both L5 and Lumen. This includes standard routing with `get`, `post`, etc, as well as `resource` and `controller` routes.\r\n\r\nYou can also setup group options much like in previous options (there is also an `$api->group()` method).\r\n\r\n```php\r\n$api->version('v1', ['namespace' => 'App', 'protected' => true], function ($api) {\r\n    $api->resource('users', 'UserController');\r\n});\r\n```\r\n\r\nAside from that not a whole lot has changed but there are a few new things that I'll be talking about over time. For now, I'd love it if people could give it a whirl and let me know if they come across any issues. I'll iron things out as quick as I can.\r\n\r\nCheers.\r\n\r\n---\r\n\r\nAnother thing to note is that a `prefix` or `domain` will be required now. You can set these via the environment variables `API_PREFIX` or `API_DOMAIN` respectively, or by publishing the config and making the appropriate changes."},"comment":{"url":"https://api.github.com/repos/dingo/api/issues/comments/103449006","html_url":"https://github.com/dingo/api/issues/398#issuecomment-103449006","issue_url":"https://api.github.com/repos/dingo/api/issues/398","id":103449006,"user":{"login":"pc-paul","id":5278116,"avatar_url":"https://avatars.githubusercontent.com/u/5278116?v=3","gravatar_id":"","url":"https://api.github.com/users/pc-paul","html_url":"https://github.com/pc-paul","followers_url":"https://api.github.com/users/pc-paul/followers","following_url":"https://api.github.com/users/pc-paul/following{/other_user}","gists_url":"https://api.github.com/users/pc-paul/gists{/gist_id}","starred_url":"https://api.github.com/users/pc-paul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pc-paul/subscriptions","organizations_url":"https://api.github.com/users/pc-paul/orgs","repos_url":"https://api.github.com/users/pc-paul/repos","events_url":"https://api.github.com/users/pc-paul/events{/privacy}","received_events_url":"https://api.github.com/users/pc-paul/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T11:23:21Z","updated_at":"2015-05-19T11:23:21Z","body":"@vinkla Thanks for help, removed fractal, but still an error:-\r\n\r\n\r\nLoading composer repositories with package information\r\nUpdating dependencies (including require-dev)\r\n  - Removing laravelcollective/annotations (v5.0.9)\r\n  - Removing doctrine/annotations (v1.2.4)\r\n  - Removing doctrine/lexer (v1.0.1)\r\n  - Removing league/period (2.5.1)\r\n  - Removing fzaninotto/faker (v1.4.0)\r\n  - Removing league/fractal (0.11.0)\r\n  - Installing league/fractal (0.12.0)\r\n    Downloading: 100%\r\n\r\n  - Installing dingo/api (dev-develop 643d735)\r\n    Cloning 643d73506a6cf000379730221a6ccb131d2034ee\r\n\r\n  - Installing nikic/fast-route (v0.4.0)\r\n    Downloading: 100%\r\n\r\n  - Installing laravel/lumen-framework (5.0.x-dev c75483f)\r\n    Cloning c75483f00722f3e96bb16ea543a4f035ff3ce870\r\n\r\ndingo/api suggests installing tymon/jwt-auth (Protect your API with JSON Web Tok\r\nens)\r\ndingo/api suggests installing lucadegasperi/oauth2-server-laravel (Protect your\r\nAPI with OAuth 2.0.)\r\nWriting lock file\r\nGenerating autoload files\r\n\r\n\r\n\r\n  [Symfony\\Component\\Debug\\Exception\\FatalErrorException]\r\n  Call to undefined method Illuminate\\Foundation\\Application::getCachedCompil\r\n  ePath()\r\n\r\n\r\n\r\nScript php artisan clear-compiled handling the post-update-cmd event returned wi\r\nth an error\r\n\r\n\r\n\r\n  [RuntimeException]\r\n  Error Output:\r\n\r\n\r\n\r\nupdate [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]\r\n [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-\r\nprogress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]\r\n [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [p\r\nackagesN]\r\n\r\n"}}