Questions tagged as 'laravel-5'

1
answer

Sort unpaged list in php laravel

I'm organizing some list objects by their names, but I want to sort them without having to page them. The code that I have is the following: if ($filter['sort'] == 'name_asc'){ return Employee::orderBy('first_name', 'ASC')->paginate(100...
asked by 03.10.2018 / 00:56
2
answers

Nested lists in Laravel 5.5

I'm working on laravel 5.5 I have these two lists: 1- The first is a list of operating systems {!! Form::mySelect('id_so', 'Sistema Operativo', App\SistemasOperativos::pluck('nombre', 'id')->toArray(), null, ['class'=>'chosen', 'pl...
asked by 22.08.2018 / 19:55
1
answer

call a function in the laravel login

I'm working with Laravel 5.5 and I want to call a function every time a user logs in and is authenticated in laravel, I've been searching and can not find anything. and the final question is Do you call a function in laravel when it is logged in...
asked by 13.04.2018 / 19:01
2
answers

How to pass data from one view to another with Vue and axios in Laravel

I'm working with Laravel and I have this link in view A <div id="app"> <a href="{{ route('ministries.index') }}">Enlace</a> </div> and I want to click on that link to direct it to view B and show me the results...
asked by 14.02.2018 / 03:37
1
answer

Laravel and the formatting of dates

Gentlemen I am making a query to a table with Eloquent ... and between the fields that I want to consult this one of date, as I do so that in full consultation to bring the date formatted? Ex: $consulta=Ejemplo::select('fecha')->find($id);...
asked by 20.02.2018 / 15:04
2
answers

Laravel 5 create Table and Self-Referenced model (self Referencing)

How do I create a table autor referenced and how do I do the relationship in the same model?: Example: Tengo una tabla: Categoria Campos: categoria_id, nombre, categoria_padre It translates that a category (parent) can have many...
asked by 16.02.2018 / 05:35
1
answer

Error when relating tables in laravel 5.5

Veran I want to do with laravel 3 tables: Plants, User and Comments. The story is that a user can write comments about the plants to ask or answer questions about the plant. Migration of the Plants table: <?php use Illuminate\Support\Fa...
asked by 10.02.2018 / 15:24
2
answers

Problem redirecting laravel

I have a page where I store images in a project folder and the name of the image file I store in the DB. So all right, I can save and delete the images in the folder and at the same time delete the data stored in the database. My problem comes w...
asked by 26.03.2018 / 03:31
1
answer

Error in Laravel DateTime :: __ construct (): Failed to parse time string

Create a virtual host and when entering the URL, sometimes I open the laravel page and others throw me that DateTime error, how can I solve it? I found this: link I do the php artisan key: generate but nothing happens, what follows be...
asked by 12.03.2018 / 03:39
1
answer

Laravel 5.4: I do not get data from Eloquent relationships

Using Laravel (with MySQL) I'm starting with Eloquent relationships. I try to get the related data but I do not get anything. My configuration is as follows: Migration providers: Schema::create('proveedores', function (Blueprint $table) {...
asked by 02.10.2017 / 03:28