lepikhinb / momentum-modal

MIT License
442 stars 26 forks source link

Use current page as baseRoute #37

Closed MaticSulc closed 1 year ago

MaticSulc commented 1 year ago

Hi,

would it be possible to use the current page as a default baseRoute? Example: I have a simple CRUD app, and the same base form in my create and edit pages. Would it be possible to just automatically determine from where the request came from and use that as a backdrop? Second thing, is there an option to not modify the URL at all? I've managed to partially implement it using redirect (from vue's useModal) , but it makes a redirect.

jeffreyvanhees commented 1 year ago

You will always have to define a base route, because the model is also always directly approachable via it's URL. I think what you want is not possible.

lepikhinb commented 1 year ago

@MaticSulc this is the way it currently works. For internal requests, it's using the previous route as a backdrop.

MtDalPizzol commented 6 months ago

Not sure... But if I don't call the ->baseRoute() method on the controller, I get a Typed property Momentum\Modal\Modal::$baseURL must not be accessed before initialization error. Was expecting it to use the previous URL...