Is there any way to do HasMany by bringing records by date?
public function despesas()
{
return $this->hasMany(Despesa::class); //registros apenas desse mês
}
I tried to use the following but did not scroll:
public functio...
I'm trying to use some "laravel framework" classes in other files, but I'm not getting any success.
For example:
I created a public/teste.php file with the following code:
require __DIR__.'/../bootstrap/autoload.php';
use Illuminate...
I have a CategoriaCNH table with the following fields CodCategoriaCNH and Descricao .
I have this code snippet html :
<select name="categoriaCnh">
<option value="" disabled selected>CNH</option&g...
Folks, I'm using Mac and trying to install Laravel. I already installed composer , I ran the command line documented in the framework:
composer global require "laravel/installer=~1.1"
It does everything ok, but when I try
laravel ne...
I'm trying to send JSON of view to a route, but I can not. Unfortunately I know little about JSON , ajax , GET and POST .
In the view, json:
var json = {
"numeroMesa": numeroMesa,
"itens": itens
}...
I am making a query in Laravel to see if the user with the email, CPF or username entered already exists in the database.
# Verificar se Usuário Já Existe na Base de Dados
$verUser = User::whereEmail($email)
->...
I think this is a totally valid curiosity, as it greatly facilitates and speeds development.
I often analyze the framework code I usually use, such as Cakephp 2 , Laravel 4 and Symfony 2 .
I started working shortly with...
I'm using Laravel 5.3 and would like to run a task every minute, within the task I'll put some checks, the question is to make it run every minute.
I did the following in App \ Kernel:
protected function schedule(Schedule $schedule...
I have the following relationship in my Model Client:
public function Usuario(){
return $this->hasMany('SIST\Models\Admin\Usuario', 'id_cliente');
}
I pass the client data by my Controller :
$cliente = Cliente::find($...
I have the following login form in a dropdown, my question is, how to do login validation without redirecting the page?
Currently when the user informs a wrong password it is redirected to the login page and informs the error message.
<...