Questions tagged as 'laravel-5'

2
answers

How to globally set the default date output in Laravel 5?

I remember well when I used Laravel 4 that it was possible to globally convert the formats of created_at and updated_at , to display in JSON responses or even to the {{ $model->created_at }} direct call. I did the follo...
asked by 14.03.2017 / 17:09
2
answers

How to compress the output of an HTML in Laravel?

I answered this question here once about the subject: Store PHP script output in HTML "compacted" . But now I would like to know how I can do this in Laravel. When it comes to an HTML response, how could I capture all the rendering of...
asked by 14.09.2016 / 19:08
1
answer

Initial Value Sequences Postgresql - Laravel 5.1

Hello, I'm running some tests in my application, but I'm having the following problem: After migrate and db:seed , whenever I'm going to insert some registry by applying a duplicate primary key error. I have already seen that this e...
asked by 11.01.2016 / 13:43
1
answer

Ambiguous column - Laravel 5.1

Good morning! It's the following ... I have these 2 tables in my postgresql database: tipos_risco --id --nome agentes_risco --id --nome --id_tipo_risco (foreign key) The problem is that I am not able to extract the data from them together,...
asked by 06.01.2016 / 13:50
2
answers

Validate file jpg - Laravel 5

I'm trying to use Validator to validate the upload file type but I do not know if the syntax is correct $data=Input::all(); $file = $data["picture_url"]; $rules = array('picture_url' => 'required|max:10000|mimes:jpg');...
asked by 12.02.2016 / 19:13
1
answer

Required_if with more than one field in Laravel 5.3

I have the following situation: I want a field to be mandatory only if the other two are null , if one of the other two is not null this field is no longer mandatory. I thought about using required_if , but I believe that i...
asked by 05.02.2017 / 19:17
1
answer

Extension of function in laravel

I'm using Laravel 5.3 and apparently I have a Controller calling the function: (new AnuncioRepository())->getListagemAnuncios() and the SQL for this is: return DB::select(' SELECT anuncio.id,...
asked by 04.01.2017 / 13:44
1
answer

Laravel and Front-End

Well, I wanted the opinion of some dev's who have been through the same dilemma I'm going through now, I do not know if this is the right channel to ask that question. I have to build an application, I want to do it in Laravel, for the backEnd...
asked by 02.01.2018 / 17:17
1
answer

Html with laravel 5.2 [closed]

I have a button in my index. I want to call another page like I do in laravel 5.2? Was it through the routes?     
asked by 14.08.2016 / 01:05
2
answers

How to see the queries that were executed by eloquent in Laravel?

How can I find out which queries have been executed in Laravel? For example, I have the following query: $usuarios = Usuario::with('nivel')->where(['status' => 1])->get(); I would like to know which queries were executed. Can yo...
asked by 24.08.2016 / 15:09