maurobonfietti / slim4-api-skeleton

Useful skeleton for RESTful API development with PHP and Slim 4.
http://bit.ly/2nNNOZi
MIT License
132 stars 32 forks source link

Add an option for setBasePath #6

Closed kymodoke closed 4 years ago

kymodoke commented 4 years ago

In order to suit different use cases :

it would be interesting to add $app->setBasePath(xxx) where the basepath could be defined in .env file. Note: just after after $app = AppFactory::create in src/App/App.php

maurobonfietti commented 4 years ago

Hi @kymodoke

I released a new version 0.0.7, that add an option for setBasePath().

Added new env var: "SLIM_BASE_PATH", to allow running Slim in a subdirectory.

Pull Request: #9

Thanks for you suggestion!