I am trying to print the current
route in my controller
namespace findetrip\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index($page = 'home')
{
echo $route = Route::current();
return view('admin.'.$page,['pageName'=>$page]);
}
}
But i will get the following error
Class 'findetrip\Http\Controllers\Route' not found
I just found so many questions similar to this issue ,but didn't get a proper solution
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire