I have the following select in my controller:
$turmaAlunos = DB::select('
SELECT alunos.ST_ALUNO_ALU, alunos.ID_ALUNO_ALU
FROM alunos WHERE alunos.ID_ALUNO_ALU NOT IN (
SELECT turma_alunos.ID_ALUNO_ALU
FROM turma_alunos...
I have this query using eloquent
$data= \App\Logs::select('id', 'created_at')
->get()
->groupBy(function($val) {
return Carbon::parse($val->created_at)->format('d-M-');
})->toArray();
and it retu...
I have a relationship in Laravel but when I make an query comes the id and not the field name.
Model Evento
public function tipo_evento() {
return $this->hasOne('App\TipoEvento','id','tipo_evento');
}
Mode...
I have, in PHP , a method whose code returns values, passing them to a View , as in the block below:
return view('PesquisaView')
->with('clientes',$resultadoClientes)
->with('advs',$resultadoAdvs)
->with('bp...
Hello, I am developing an application in Laravel 5.2. * and need to implement a login system by username or login, does anyone have any idea how to configure or do this type of method?
The computer where I want to host the site developed in laravel is in another network. I put the whole site on the server and ran the command
php artisan serve --host MEUIP --port MEUPORTO
When I test on another computer does the browser re...
I am doing a query on Laravel and it is returning the date with the following value.
select 'campo' from 'tabela' where 'campodotipodata' = ?
Well it returns SQL , it follows code in LARAVEL
$vardata = date('Y-m-d');
$...
I am making the connection to the database mysql with laravel using the following code in the file database.php
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost...
I'm trying to get the values from the database and display on the screen, however
it gives me the following error message:
ErrorException in helpers.php line 531:
htmlentities() expects parameter 1 to be string, object given (View: /var/www/re...
I'm trying to upload an image, to save it along with the rest of the fields, but when I press the save button, the image field goes empty ..
This is the Form
<div class="panel">
<div class="panel-heading">
<h3><i...