Questions tagged as 'laravel-5'

1
answer

Picking up monthly items ELOQUENT MODEL

Well I need to make a query where I have to bring all the listed items of the month we are in. In query that I've done I'm bringing all with status co_de O : $vendas = Encomenda::where('FlgStEncomenda', 'O')->c...
asked by 11.11.2016 / 15:09
1
answer

How to get the result of the query executed in Eloquent?

How do I get the result of query that will be executed in the database? Example: foreach ($prestadores as $prestador){ $achou = \DB::table('modulo_pr_espelho') ->where('prestador_id','=', $prestador->id)...
asked by 14.11.2016 / 21:44
3
answers

belongsToMany Laravel - find ()

I'm developing an Intranet that will span Categories and Posts . A post can receive "n" categories. For this purpose I am using belongsToMany () . The problem is when returning this data with Post :: find ($ idpost) , it returns not o...
asked by 19.08.2016 / 13:41
1
answer

Sorting data with php

I need to sort an array by a specific "order" field, where within that array I have banners with the id, order, name, and img fields. I need to sort this array in order. the 0 order banner needs to come first, 1 second, and so on.     
asked by 21.09.2016 / 20:19
1
answer

Collapse bootstrap is not closing

I'm using the following code to do a Collapse with bootstrap, it opens normally but does not close when clicking again, can anyone help me? <div class="well"> <button href="#task" data-toggle="collapse" class="btn...
asked by 19.09.2016 / 21:32
1
answer

Laravel 5.2 - How to display in @foreach in View, only records regarding the authenticated user?

I have a records table with a id_user field, in this table there are data entered by some users of the system. I need when the user authenticates in the system, only see the records that he created. That is, records that have id_user =...
asked by 02.11.2016 / 17:26
1
answer

With creating a Request with namespace in Laravel

I tried to create a Request with a subnamespace in Laravel 5, but without success. When I run the command php artisan make:request Temp\OsRequest , instead of creating a file named OsRequest inside a Temp folder, a class ca...
asked by 23.05.2016 / 20:18
1
answer

Is it possible to customize the return of laravel validation when I use the Request?

When I use a post request and validate the data using the Request in Laravel 5.2 via ajax, the data is automatically returned to javascript. I would like to know if there is a way I can capture and customize this data the way I want it to return...
asked by 17.05.2016 / 22:45
2
answers

HTTP Error 500 when putting a laravel5.1 project in production

I developed a project in Laravel 5.1. In Localhost everything works fine, but when I upload to the client server, which is not shared and is running PHP 5.6, it does not work. The HTTP ERROR 500 error appears. Can anyone help me?     
asked by 06.05.2016 / 00:42
1
answer

Laravel 5.2 $ errors empty

I'm using Laravel 5.2 and I'm trying to create a validation for user registration. In UserController.php I have: public function postSignUp(Request $request){ $this->validate($request, [ 'email' => 'required|email|unique:u...
asked by 10.05.2016 / 20:15