Support the ongoing development of Laravel.io →
Configuration Views
Last updated 2 years ago.
0

Any help please !!

0

This works:

Route::get('users/add.html', function () {
    echo "this is a test";
});

Your question is a bit too ambiguous to answer, but i'll try. If by suffix you mean '.html', in the route this works. Be careful, if your route returns:

return View::make('users/add.html');

In the view, it's going to convert the . to / so it would read from views/users/add/html.php

Last updated 9 years ago.
0

I have been trying to do this with the built in php development server - PHP 5.4.33.

php -S localhost:8888 -t public

I was getting the "Not Found" error page when using the following route:

Route::get('contact.html','PagesController@contact');

So I turned off the built in server and tried MAMP and it worked.

For some reason the built in php server won't recognise the .html extension in the route, but apache in MAMP does it fine.

UPDATE: I also tried this with PHP 5.6.1 with the same result.

Last updated 9 years ago.
0

I have found some additional information here

Seems to be an issue with how Laravel does routes with the dev server.

One commenter on that page suggested this to try this at the prompt:

$ php artisan serve

Creates a localhost:8000 local server and it works.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

adahhane adahhane Joined 19 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.