Questions tagged as 'laravel-5'

1
answer

Creating dateTime field with laravel collective

I am creating a field using Laravel Collective but I am having problems with the date field, first I am not able to create the DATATIME field and another problem is that it is coming from the bank, how can I solve these two problems ? {...
asked by 10.09.2016 / 18:41
1
answer

How does Laravel read the ".env" file?

How does Laravel read the .env file? I have already looked at the repositories of Illuminate (from Laravel) and found nothing that would give me a hint as to how to read this file. Is there a library, which Laravel uses, that does t...
asked by 30.09.2016 / 19:12
1
answer

Version of laravel project 5.1

I do a project in Laravel 5.1 and I use XAMPP and all the settings like this local database, (home computer) etc. But I pushed push ) to Github this project only when I go on the work PC I clone the project and it does not work logically. Wh...
asked by 25.04.2016 / 14:50
1
answer

Update in Laravel 5 a field receiving the value of another field from the same table

I have a configuration table in my database that has the following fields: ["id", "texto", "textoOriginal"] . Initially the values of the texto field are equal to the textoOriginal field, but the user can at any given time ch...
asked by 22.05.2015 / 23:12
1
answer

What is the difference between Model :: lists () and Model :: all () - lists () in Laravel?

In Laravel , we have a method that we can list fields of a table in the key-value style. I can do this in two ways So: Usuario::lists('nome', 'id'); And So: Usuario::all()->lists('nome', 'id'); The result would be: [1...
asked by 17.02.2016 / 11:47
1
answer

How to pass two variables from a view to the controller?

I have a link where I already pass a variable to the controller. It works ok. How do I get through two? My link in View: <a href="{{url("/ordemvar/$equipam->codigoequipamento")}}"><i class="glyphicon glyphicon-tasks"></i&g...
asked by 11.01.2017 / 17:41
1
answer

Laravel 5 - how to connect multiple databases at the same time?

I have already researched in several places, and they all lead to this link . But I could not work using the methods given in the link. The problem: I have 3 banks configured in config / database.php: "main", "bank-1" and "financial", and I...
asked by 17.03.2017 / 21:24
2
answers

Select specific columns of two related tables

I have a relation of N x 1, Post x User , have a relationship like the following: Post.php (model): .... public function user() { return $this->belongsTo('User'); } .... What I want is to select the id and the user...
asked by 31.10.2017 / 21:55
1
answer

How to identify in the constructor the method that was called?

How do I in the constructor of my controller identify which method was called? I'm using Laravel 5.3 and my controller follows the default resource ( index, show, edit ...).     
asked by 20.12.2016 / 15:23
2
answers

Object property coming from JSON is not accessible

I'm working with framework Laravel on versão 5.2 I'm developing a API where I have a Painel administrativo that produces and manages content, in this case produto , and I have another site that will consume...
asked by 10.10.2016 / 15:38