I'v found the solution. there is nothing to change in laravel appliation for https routing. you just need to configure ssl certificate properly
May 14, 2015
2
Level 1
https routes for rest apis
hi ! i need to crate a rest api on https protocol, for that purpose i have created a filter Route::filter('forceHttps', function ($req) { if (!Request::secure()) { return Redirect::secure(Request::getRequestUri()); } }); and then applied to my route like this Route::group(array('prefix' => 'api/v1'), function () {
Route::group(['before' => 'https'], function () {
Route::resource('top-players', 'Api_PlayerController@getTopFivePlayers');
});
}); when deploy this on server and hit it from postman server gives error in response ERROR : The requested URL /api/v1/top-players was not found on this server
Please or to participate in this conversation.