Questions tagged as 'laravel-5'

2
answers

Filter records by month and year in Laravel

I have a form with a field of type month , which sends a value in the format Y-m to my controller. How do I search the records for the selected month and year? I'm using l5-repository I did this, but it does not work: $dat...
asked by 12.09.2016 / 22:35
1
answer

Host site in laravel [duplicate]

I have a project in Laravel. When I put my files to my hosting server and access the domain, it shows me the files and folders instead of redirecting me to the index. On my machine I create a virtualhost pointing to the public folder where...
asked by 05.02.2018 / 22:26
1
answer

Laravel 5 improve filter

I created a filter in my view index, when I put something inside one of the filter inputs it enters the ifs but I think it is not good in this way, does anyone know in any better way? public function index() { $usuariosFiltro = null; $...
asked by 20.07.2015 / 20:27
2
answers

How to check if the entity already exists in the bank

I'm currently working with models, migrations, seeds and fakers (factory) for testing the database. So far, I've got to insert 1 admin, whose code I'll introduce: DB::table('users')->insert([ 'id'=>'1', 'name' =&g...
asked by 03.02.2017 / 18:09
4
answers

Get the first 2 user names

Let's say the name of my selected user is " Raylan Soares Campos ", how do I display only the first two names? In the case " Raylan Soares ". I'm using laravel 5.2, I do not know if I have a facilitator or if I have to do a function manually,...
asked by 30.06.2016 / 22:46
1
answer

Problems with csrf_token laravel

I understand the operation of csrf_token but I'm having problems with it. For example when I get inactive for about 5 minutes without working on the site and try to log in, it tells me that I have a token problem. Ihavethefollowingque...
asked by 26.10.2016 / 07:16
2
answers

Working with scripts and style sheets in Laravel 5.1

I'm new to Laravel 5.1 (actually Laravel) and I'm having a hard time understanding how to work with style sheets and simple scripts. On several sites, I see that I need to add an element in my composer.json which is "laravelcollective/html"...
asked by 01.12.2015 / 17:09
2
answers

Know if at least one checkbox is selected within an array of laravel

I have a laravel array that renders checkboxes: @foreach($images as $img) <div class="col-md-3"> <img src="{{url('gallery_images')}}/{{ $img->image }}" class="img-thumbnail" alt=""> &l...
asked by 29.10.2018 / 15:32
2
answers

Options for generating API documentation in Laravel

I need a lib to generate API documentation in Laravel 5.4?     
asked by 01.06.2017 / 13:42
1
answer

Get the id of the maximum value

In a Mysql table id valor 1 5 2 15 3 7 I want to get the value of the "id" that has the highest value in the value field. I want it to return the value 2 in this case.     
asked by 24.11.2017 / 20:10