Questions tagged as 'lumen'

1
answer

Relation between several tables in Eloquent

I'm trying to create models in Lumen based on my current database for a virtual store, but I'm having trouble setting up the relationships between them. So far I have the following Models: * Product <?php namespace App\Models; use Illum...
asked by 10.07.2015 / 19:46
3
answers

Problem with CORS using Ionic and Lumen

I'm developing an app with Ionic and using Lumen in the backend API. I'm having problems with 'CORS', I already configured the server (both using the internal PHP server and Apache, and the same error occurs in both) creating a middleware for CO...
asked by 19.11.2017 / 15:34
1
answer

Modularize only Views of Laravel

I have the following structure: - resources/ - views - Modulo1 - view01.blade.php - Modulo2 - view01.blade.php But I have a problem, I can not use the blade directives without conflict, if I use within modulo02 / view01...
asked by 21.09.2018 / 21:58
1
answer

Validation of fields in Lumen 5.5

In version 5.2 of Lumen the following validation in Controller is working: $this->validate($request, [ 'nome' => 'required', 'email' => 'required|email', 'cpf' => 'required', ]); Same as the following...
asked by 16.10.2017 / 16:09
1
answer

Error while deploying in Azure Service Apps

I'm having the following problem, I'm using the azure deploy service, I'm trying to upload an application in lumen (php). I even get uploaded when I make a request inside the application the following error occurs:    The resource you are loo...
asked by 28.11.2018 / 19:24
1
answer

Expose an object (based on the request) for every application

Oops, I do not know if it's possible to do what I want, but come on: I have an api in lumen which basically read a specific header from the request and parse it into a YAML file and transforms it into an array, but as I use it in several diff...
asked by 18.09.2018 / 22:06
0
answers

How to create a unit test with Header Authentication?

I'm using the php framework Lumen and I need to do a unit test that passes through a midleware with authentication via token Basically I get a token when I log in, and after that in this type of request I need to send an Authorization heade...
asked by 18.06.2018 / 19:38
0
answers

Translate AuthServiceProvider from Lumen to Laravel

I have already researched the entire documentation but can find no way to make this AuthServiceProvider work in Laravel 5.6 in the same way it works in Lumen 5.4. Auth::viaRequest('api', function ($request) { if (($userId = $request-...
asked by 20.04.2018 / 02:04
0
answers

Lumen / Laravel - PDOException: could not find driver

I want to connect Lumen to MySQL. PHP INFO link Web.php file (containing the routes) $router->get('/', function () use ($router) { $results = app('db')->select("SELECT * FROM resenha"); return $router->app->ver...
asked by 04.04.2018 / 19:25
1
answer

Migrations giving error 42000

I'm trying to run my migrations (php artisan migrate) inside my container Docker . I'm using Lumen to develop my API . I do not know what might be happening: What can be happening? I have refitted my migrations and nothing has chang...
asked by 25.01.2018 / 13:06