My next project structure:
My ControllerLogin class is as follows:
<?php
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesResources;
class ControllerLogin extends BaseController {
public function index() {
return view('template.login-template');
}
}
?>
My Routes:
Route::get('login', 'ControllerLogin@index');
I have the following error: Sorry, the page you are looking for could not be found.
My question would be: how should return view of my controller class be, because login-template is inside the template folder, is not finding page.
I was able to solve my problem I forgot to add the following line in my ControllerLogin class:
namespace App\Http\Controllers;