use Illuminate\Http\Request;
use Illuminate\Database\Eloquent\Model;
//routes目录下的路由文件中的Route
use Illuminate\Support\Facades\Route;
//获取当前路由
(1)request()->route()->getName();
(2)\Illuminate\Support\Facades\Route::currentRouteName();
//return redirect('homepage');和return redirect()->route('homepage');
//前者是重定向到url为homepage的路由,后者是name为homepage的路由
网友评论