Questions tagged as 'lumen'

1
answer

Categories tree in MongoDB, how to model?

Good night, guys. As MongoDB changes a lot of our way of modeling a database, I came across a question that may be half-beast. I'm doing a Restful API using Lumen and MongoDB as a database, and I want to create a collection of product cate...
asked by 07.10.2015 / 04:49
1
answer

Download File via API + Lumen + Maatwebsite \ Excel

I have an Angular application 5 that makes a request to the backend made in Lumen 5.6, in this backend, I have a function that creates an excel file, with the Maatwebsite \ Excel library, for download. However I am not able to download the file...
asked by 13.07.2018 / 12:03
1
answer

Lumen and Firebird Database

Is it possible to use Lumen and Eloquent in a Firebird database that is already used by another application, without ORM making changes to the database structure? Another detail: Is it possible to access only 10% of the tables without the ris...
asked by 25.07.2016 / 02:37
1
answer

Validating routes in Lumen

In Laravel I have for example: Route::get( '/produtos/mostra/{id}', 'ProdutoController@mostra' )->where('id', '[0-9]+'); How would this type of validation be done in Lumen ? Since a route is caused by $app : $app->get...
asked by 30.12.2016 / 16:23
1
answer

Controller exists but Lumen says it does not exist

My routes are like this. link < - this is the url I'm requesting $app->group(['prefix' => 'api/v1'], function($app) { $app->get('/', 'CommunitiesController@index'); } Mycontrollerislikethis<?phpnamespaceApp\Models\Contro...
asked by 02.09.2017 / 02:59
1
answer

Exception handler return in JSON

I am building a RestAPI using Laravel / Lumen , in tests it can happen that the return is entirely in HTML, this occurs when that already famous screen appears: Whoops looks like something went wrong This is very difficult to test the re...
asked by 24.01.2017 / 00:50
0
answers

How to add Reliese / Laravel to the provider in Lumen / Laravel, latest version?

I just installed Lumen and will need to use Reliese to create the Models (and migrations) from a database that already exists. Following the documentation, after installation I need to add Reliese to the provider in Config / app.php The...
asked by 20.08.2017 / 23:24
1
answer

Error when using Middleware in Laravel / Lumen

Personally I have the following error: ReflectionException Class Illuminate\Cookie\Middleware\EncryptCookies does not exist I'm using Lumen but I think I may have set something wrong in the app.php: $app->middleware([ Illuminate\Coo...
asked by 06.03.2018 / 20:09
1
answer

Auth :: loginUsingId does not work in Lumen

I'm trying to use the Auth::loginUsingId method in Lumen, but I get the following error:    (1/1) BadMethodCallException Method loginUsingId does not exist. in   Macroable.php (line 74) at RequestGuard-> __ call ('loginUsingId',   arra...
asked by 16.04.2018 / 21:32
0
answers

How to use Eloquent without losing performance (51.39%) in Lumen 5.4?

Developing an API that must handle a high-performance website. By doing a few tests, I noticed that Eloquent usage is lowering the performance of requests in the MySQL database in 51.39% (more than half). The OS is ubuntu 16.04 and the fra...
asked by 12.10.2017 / 15:42