Questions tagged as 'laravel'

1
answer

What is the correct order to inject dependencies in Laravel controllers?

I have noticed that sometimes, depending on the order that I inject the dependencies, they do not work ... Is there a correct order?     
asked by 09.02.2018 / 01:49
2
answers

How can I sort a result in Laravel with a custom attribute of my model?

My actual table is very large, so I'll use this example I found on the internet to make it easier to explain my problem ( source ). Table Fields: first_name last_name email password created_at updated_at In Laravel we can customize our...
asked by 29.03.2018 / 17:14
1
answer

User registration with CPF or CNPJ Laravel 5.5

How do I custom validate user registration for Laravel on auth default using php artisan make:auth ? I need the following clause It is mandatory to enter the field CPF or CNPJ . I found the validation of the registry...
asked by 14.02.2018 / 11:34
1
answer

Error when using Middleware in Laravel / Lumen

Personally I have the following error: ReflectionException Class Illuminate\Cookie\Middleware\EncryptCookies does not exist I'm using Lumen but I think I may have set something wrong in the app.php: $app->middleware([ Illuminate\Coo...
asked by 06.03.2018 / 20:09
1
answer

Make inclusion of the respective user Laravel 5.5 Auth Default

I have a simple question, I am putting together some registers for the purpose of studying the laravel framework, with People, Chart of Accounts and etc. I'm using Laravel's default authentication, and now I came across the following situatio...
asked by 27.02.2018 / 13:16
1
answer

Multi-table inheritance in Laravel

I have a Resource entity, which in turn has several implementations, for example, VideoResource and MarkdownResource . Resource has several shared properties, the other two examples in turn have specific properties...
asked by 20.02.2018 / 03:29
1
answer

Select with foreign key Laravel

Hello, I have been able to solve a foreign key problem now and I came across a second, I have no idea how to retrieve in a select in the view the data of another table. If anyone can give me a simple example, I would be grateful. My create, store...
asked by 26.03.2018 / 00:50
1
answer

Query JQuery-Ajax Laravel 5.5

   I can not do the ajax query in Laravel5.5. Inquiry Form: <form action="ConsultaEmpresa" method="get" name="FormConsultaEmpresa" id="FormConsultaEmpresa"> {{ csrf_field() }} <input type="date" style="width: 30%;" c...
asked by 24.04.2018 / 17:32
1
answer

Update form registration with photo Laravel

It is as follows, I have a file system in laravel, in the edit part, the form loads the fields filled with the photo, if I click update and do not choose an image file again the error appears: " Call to a member function getClientOriginalExtensi...
asked by 19.12.2017 / 19:29
1
answer

How to use inner join in Laravel 5?

I have the following loop in a view table @foreach ($filme as $f) <tr> <td>{{ $f->fil_id }}</td> <td>{{ $f->fil_filme }}</td> <td>{{ $f->fil_sinopse }}</td>...
asked by 11.12.2017 / 03:20