Questions tagged as 'laravel-5'

1
answer

What are the Events for at laravel?

I have never used Event in Laravel and would like to know what the purpose is and if it has any advantage.     
asked by 09.12.2016 / 14:59
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 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
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
3
answers

Route access control - Laravel 5.1

I have some views that only clients can access, and some that only administrators can access. What I defined in the case is the client_id, which if "1" is an administrator and if it is any other client. I control this with 2 Middleware locally,...
asked by 27.01.2016 / 15:31
2
answers

Problem in a foreach

I'm using Laravel 5.3 , and when doing a foreach in the view, it does not recognize as an object, but if I print only what is in the $user variable it prints a json object %. Controller: public function getAll() { retu...
asked by 08.11.2016 / 12:17
3
answers

How to convert timestamp from the database to populate a datetime-local field?

I need to fill in a field: <input id="date" type="datetime-local" class="form-control" value="{{$task->date}}" name="date"> The return comes in timestamp format, 2016-09-20 10:00:00 ), there is some helper in> laravel to conv...
asked by 19.09.2016 / 16:26
2
answers

How do I find out the first or last Loop item in Laravel?

I have the following foreach in Laravel. @foreach($values as $value) <li>{{ $value }}</li> @endforeach I would like to add some special information when it comes to the first item in the loop. In some other template...
asked by 02.09.2016 / 16:57
2
answers

Laravel, call Action from a Controller from a View?

I have a View where in it I would like to add the link of a Controller with its Action specifies and when loading this View to Action of that Controller is triggered. Example: within a View I...
asked by 27.06.2017 / 07:01