Criei um controller e configurei uma rota no laravel porém ele não reconhece a class do controller
17/09/2020
0
---- Código das rotas
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| 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(''''principal'''');
});
Route::get(''''/cadastro'''',[''''as''''=>''''cadastro'''',''''uses''''=>''''ProntuarioController@cadastro'''']);
------------------------- Código do Controller
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class ProntuarioController extends Controller
{
public function cadastro(){
return view(''''cadastro'''');
}
}
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| 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(''''principal'''');
});
Route::get(''''/cadastro'''',[''''as''''=>''''cadastro'''',''''uses''''=>''''ProntuarioController@cadastro'''']);
------------------------- Código do Controller
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class ProntuarioController extends Controller
{
public function cadastro(){
return view(''''cadastro'''');
}
}
Enzo Xavier
Curtir tópico
+ 0
Responder
Clique aqui para fazer login e interagir na Comunidade :)