Questions tagged as 'laravel'

3
answers

Difference between create and fill - laravel method

I was developing a web service with laravel, and I realized that I can save the data in my bank in two ways: Product::create($request->all()); or else: $product = new Product(); $product->fill($request->all()); $product->save(...
asked by 23.04.2018 / 14:08
3
answers

Customize field name in validation error messages

I am using the Laravel 5.2 authentication standard Controlller: php artisan make:auth As the names are in English, I need to change to Portuguese. I already configured the locale for Portuguese, in /config/app.php : 'locale' => 'pt-BR...
asked by 07.03.2016 / 18:55
2
answers

How to Customize the Simple Paginator Arrows?

It is very good to use Laravel's paging, with a command if it does everything: Controller $artigos->simplePaginate(5); View {!! $artigos->render !!} And after that the pagination is generated. But by default comes the PREV...
asked by 26.11.2016 / 12:23
2
answers

How to edit the routes created by the make: auth command?

I have a project in Laravel where I used the make:auth command to create the views , routes, controllers and etc from a registration form. I need to change the view that is used by default in login to a view that I create...
asked by 06.04.2017 / 20:05
2
answers

Make CallBack in Having

In Laravel it is possible to make a callback at the time of a query. For example: $q = Model::where(function($query){ $query->where(...); }); I would like to do something like this, but with having () , since I need to check if a gi...
asked by 24.05.2016 / 16:07
2
answers

How to get a json on Controller and pass to array object

I'm having the following problem, I need to get the filtered objects in the Controller to export to report. I'm sending json using Ajax, but I do not know if the object is being sent to Controller, I gave a console.log (response) and the followi...
asked by 17.10.2018 / 14:39
2
answers

Request laravel does not return input file

Why can not I get the View file? I have a form that points to a route. Among other attributes, I have a file upload. This file upload is the only attribute that does not appear in request . <label for="recipient" class="control-lab...
asked by 21.12.2017 / 20:24
1
answer

What is the difference between @yield and @include in Laravel?

I'm learning Laravel 5.3 , @yield and @include seem to me much the same thing, the only difference I know is that @include injects the variables of parent > and can also include other variables. What is the difference between...
asked by 29.01.2017 / 00:47
1
answer

Save several attributes to the same object in Laravel

I have a property table of other properties and created a property_table_table since an property can have several attributes. I have created the models Imovel and Attribute, I need to create an Imovel_atributo model? How could I do in the store...
asked by 30.11.2016 / 17:18
1
answer

Error using a function inside array in PHP

I'm using laravel 5.2 and in my class IndexController I'm trying to create an array with the function date('Y') like this: <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Requests; cl...
asked by 08.05.2016 / 21:19