php - laravel setup different route according to domain/subdomain -
good day,
i using laravel build both website , apis mobile backend, api controller setup this:
route::controller("api/", "apicontroller"); //mobile apis, response in json
and other routes , this:
route::controller("/", "maincontroller");
i need setup subdomain apis, instance:
to route directly api controller, need because don't want url long , ugly. suggestions ?
try using this
route::group(array('domain' => 'api.mysite.com'), 'apicontroller');
Comments
Post a Comment