I have a name column that belongs to the Producer_BVU model, whose names are:
2M1J
A. Coelho
ÓRBITA
Bruno
When I order:
\App\Producer_BVU::orderBy('name', 'ASC')->get();
The output is:
ÓRBITA
2M1J
A. Coelho
Bruno...
I was developing an application with Laravel 5.5 with a Mysql database. Everything was working normally, however, now the database has been modified to SQL Server.
When I run the test, it returns the error "Invalid handle returned."
Searc...
I'm using Form Request Validation to validate a form, but when I leave a field of type required blank no error is generated.
How do I generate an error when validation fails?
class SaleRequest extends FormRequest
{
public f...
The code below returns all the records of the database and also searches for the term typed in input of search with pagination.
The problem is that by clicking for example on page 2 it already refreshes the page returning all the recor...
I'm starting with SQL of Laravel I looked a lot more I did not get a response of how to AND after where , follow sample code to implement AND .
SQL:
UPDATE contas
SET valor_titulo = 0,
WHERE id_contrato = 2...
I'm in a project that is in production, and by default when we use a foreign key in eloquent we follow the following rule "user_id" for example to store the user id.
Only in the database that I'm working with, they put this field as " id_u...
I'm using the code below to assign the "active" class when on the "product" or "product / create" route.
<li {!! Request::is('produto', 'produto/create')? 'class="active"' : null !!}>
Now I need to do the same in the product edition,...
I have a query with Left Join with AND I am not able to implement this in laravel 5.
An excerpt from the query:
LEFT JOIN visitante v ON a.codigo = v.id
AND v.data BETWEEN '2015-06-01' and '2016-05-31' and v.status = '1'
I tried this wa...
I have the database User , Professional and Address in the database. The foreign key for User is in Professional and the foreign key for Professional is in Address . I need to register a professional, who is a user and has an address...
I'm having trouble with a relative search on Laravel . I give the option of several on-screen search, they are:
start date
end date
status,
and who it is
But the person can search in a unitary way, for example: I want to get e...