Laravel routing within a sub-folder

时间:2015-07-28 22:20:23

标签: laravel routes

I'm trying to route a page located inside a sub-folder within the Views folder.

My folder structure

 -routes.php
   --Views
   ---Featured
   ----pageA.php
   ---page1.php
   ---page2.php

So how would I route pageA.php so that the url reads mywebsite.com/featured/pageA?

1 个答案:

答案 0 :(得分:1)

Route::get('featured/pageA', function () {
    return view('Featured.pageA');
});

Try to avoid the use of uppercase in the URL