foreword
Especially for friends who are studying SEO, you should know that sometimes we need to redirect 301 pages, which is provided in Laravel 5.5The function of Route::redirect is quite simple. In addition, using Route::view is also very useful for the layout of static pages.
Redirect Routes
The syntax is very simple, we can easily useRoute::redirect
for 301 redirection.
View Routes
I don’t know if you have ever touched the template, but in fact, most of the entire website are static pages, only a few dynamic pages.It is no longer necessary to build a Controller for each page, or to display it through a function return view.
We have an easier way to handle it through
Route:view
.![Route::view('/welcome', 'welcome', ['title' => '3C Tech Center, CCC']);](/images/upload/1504805619web.php — test1.png)
No Comment
Post your comment