Erro
Symfony\Component\Debug\Exception\FatalErrorException
Allowed memory size of 134217728 bytes exhausted (tried to allocate 67084288 bytes) .
ProcInternoController
<?php
namespace App\Http\Controllers;
use App\Models\Campi;
use App\Models\ProcInterno;
use Illuminate\Http\Request;
class ProcInternoController extends Controller
{
public function index()
{
//echo "BILU";
//$email = DB::table('users')->where('name', 'John')->value('email');
//$processos = ProcInterno::query()->where('numero_proc',501)->get();
//->where('status', '<>', 1)
$processos = ProcInterno::query()
->join('sys_cja.tipos_status', 'proc_interno.cod_status', '=', 'tipos_status.codigo')
->join('corporativo.campi', 'proc_interno.cod_campus', '=', 'campi.cod')
->select('proc_interno.*', 'tipos_status.descricao as descricao_status','campi.descricao as descricao_campi')
->where('numero_proc','>',100000)->orderBy('numero_proc')
->get();
foreach($processos as $processo){
$processo->data_abertura_processo = date("d/m/Y", strtotime($processo->data_abertura_processo));
}
//return view('matriculas.index', ['alunos' => $alunos,'mensagem' => $mensagem]);
return view('processos.index',['processos' => $processos]);
}
public function create()
{
$campis = Campi::query()
->where('st','=','AT')->orderBy('cod')
->get();
return view('processos.create',['campis' => $campis]);
}
public function store(Request $request)
{
echo "OI";
print_r($request);
exit();
}
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ProcInterno extends Model
{
protected $table = 'SYS_CJA.PROC_INTERNO';
public $timestamps = false;
protected $fillable = [
'ANO_PROC',
'NUMERO_PROC',
'DIG_PROC',
'COD_STATUS',
'COD_TIPO_PROCESSO',
'DATA_ABERTURA',
'USU_FUNC_TIPO',
'USU_FUNC_NRO',
'SITUACAO',
'DATA_FINALIZA',
'HOMOLOGADO',
'CCUSTO',
'COD_CAMPUS',
'DESCRICAO_PROCESSO',
'DATA_ABERTURA_PROCESSO'
];
}
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
Route::get('/processos', 'ProcInternoController@index')->name('listar_processos');
Route::get('processos/gravar','ProcInternoController@create')->name('form_gravar_processos');
Route::post('/processos/gravar','ProcInternoController@store');
Route::delete('/matriculas/remover/{id}', 'AlunosController@destroy');
insira seu código aqui