Zenko
Zenko

Reputation: 65

Laravel routing within a sub-folder

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?

Upvotes: 1

Views: 861

Answers (1)

Dimitri Acosta
Dimitri Acosta

Reputation: 1816

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

Try to avoid the use of uppercase in the URL

Upvotes: 1

Related Questions