I have the following tables:
contacts = >
id - name - state - city
states = >
id - status - acronym
cities = >
id - city - state_id
And the following templates:
State.php
<?php namespace App;
use Illuminate...
I'm pulling data from a table to a select , however I have fields where information is the same, for example:
Controller:
$amostragens = Amostragem::all();
View:
@foreach($amostragens as $amostragem)
<option value="{{...
I need to search for users based on some filter attributes.
I have the contacts table:
id | nome | email
1 | asd | [email protected]
2 |teste | [email protected]
The groups table:
id | grupo
1 | grupo1
2 | grupo2
And the table c...
When an error occurs in Laravel 4 , with the setting of app.debug equal to false , the following page is returned:
In this case, for both% and% errors, this page is displayed.
Is there any way to change the page th...
I currently have a code that receives data from the registered companies and for each company it lists the reports of them as follows:
@foreach($empresas as $empresa) // Recebe as empresas
@foreach($empresa->CgrtInfo as $relatorio) // Bu...
I have 3 tables:
-- tipos
id
nome
-- usuarios
id
tipo_id
nome
email
-- atividades
id
usuario_id
descricao
I'm using Eloquent to capture activity and user data from the activity:
$results = Atividades::with('Usuario')->get();
But I...
I'm new to Laravel 5.1 (I come from CodeIgniter) and I have libraries of my own that I'd like to implement in it. In CodeIgniter, we have the folder libraries where I can play all my libraries there and if in case I need the same just nee...
I have a table with columns id , nome , descricao and tipo . In my Request I have:
'nome' => 'required|unique:edificacoes'
So far so good, I can not register anything with the same name, but how would I n...
When I add this route in the routes.php file:
routes.php
Route::get('postagem', function (){
return "teste";
});
Route::get('/', function(){
return View::make('hello');
});
Displays this error:
Fatal error: Class 'Route'...
I created a __construct function in the Controller.php of Laravel 5.
And this function is obviously running even on the Login screen in Auth .
Is there any way I can put as a condition, run the function inside __construct...