I have a folder I've placed in the /public folder in my Laravel site.
The path is:
/public/test
the "test" folder has a file called index.html that is just a static resource I want to load from the public folder (I don't want to create a view for this within the framework--too much to explain).
I've made a route like this:
Route::get('/test', function() {
return File::get(public_path() . '/test/index.html');
});
I'm not able to get this to work. I just get an error from Chrome saying this page has a redirect loop.
I can access it this way:
http://www.example.com/test/index.html
But I can't use the .html extension anywhere. The file must be visible as:
http://www.example.com/test/
How can I serve a single HTML page from the Laravel public folder without having to use the .html extension?