I'm setting up a bank in Laravel 5.4, but the same is hosted on another server, set up in Navicat is accessing normally, but Laravel does not connect.
APP_NAME=Laravel
APP_ENV=local
APP_KEY=.........
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=...
Good night, I do not know what I'm doing wrong, I have two models, in the migration I created it so
Schema::create('endereco_tipos', function (Blueprint $table) {
$table->increments('id');
$table->string('nome');...
I need to get the difference in days between the current date and the date stored in the database, subtract this difference by 90 and then check if the result is equal to 7. Where is the error?
whereRaw("90 - (DATEDIFF(now(), 'updated_at')) =...
I have 3 tables, [Users - > Departments - > Postings] where the Users table has many Departments Departments have many Postings.
My question is: How do I relate the 3 tables with the with () method where (where () () is this logged in w...
I have a Manifestation template that uses SoftDeletingTrait to keep them inactive in the database and in ManifestationController I have the following destroy() method:
$manifestation = Manifestation::findOrFail($id)...
The query that works in PhpMyAdmin:
Select sum(D.CargaHoraria) as CargaHorariaTotal, C.NomeCurso, C.CursoId, A.Imagem
from Curso C
inner join Disciplina D on D.CursoId = C.CursoId...
I have the following problem, I have a table with items and I need to create groups and name each item to its due group. I already distribute them by categories, which in the case I call 'families', however I need now to group them respectively...
I have the following code snippet
$sectors = Sector::where('company_id', $id)
->where('status', '0')
->with('charges.levels')
->get();
I need 3 conditions
sector status is 0...
I'm using Laravel 5.6 with Resource Controller. My show method:
public function show(Artigo $artigo)
{
$artigo = $artigo->first();
return view('painel.revista.detalhes', compact('artigo'));
}
Would it be possible to ignore the li...
I'm starting with Laravel 5.1 and I'm a bit lost yet.
I need to list categories, subcategories and "sub-subcategories".
Table:
Categorias
------------------------
id | int
nome | varchar
categoria_pai | int
Data:...