croppa icon indicating copy to clipboard operation
croppa copied to clipboard

Problem when have more that one catch all route

Open AdrianSkierniewski opened this issue 9 years ago • 0 comments

Hi,

I'm using Laravel 5.3 and I wanted to use Croppa in my current project (I used it with Laravel 4 before :)), but I encountered one issue. Croppa registers its route in service provider boot method and this method is triggered after loading route files, so if you have a catch-all route in your route files (for example cms router that needs to catch all URLs and check if they're in DB) Croppa route won't be trigger at all. I quickly checked if moving this route definition to register method will solve this issue and it will work, but then I started thinking. Why do we even need to register this route in ServiceProvider? Maybe it will be better to leave it as part of setup so everyone can decide where they want to add it, especially that now Laravel have more that one route file (web, api).

AdrianSkierniewski avatar Mar 16 '17 18:03 AdrianSkierniewski