Adding a route in Laravel as the last route, from a composer module?Laravel controllers and routes in packages?Laravel dynamic routesLaravel Custom User Roles & Permissions based on routesLaravel 5 Route Model Binding not working on serverLaravel 5, calling function inside compose@ViewComposer logs fatal error and returns result as expectedGlobal route in Laravel 5routing rules and orders in laravel 5Laravel 5.2 error message not shownLaravel 5.4 Modules: NotFoundHttpException in RouteCollection.php line 161Custom Tool is not showing View, Laravel Nova

Holes in Wall of Force

How is the Apple Watch ECG disabled in certain countries?

Can you cure a Gorgon's Petrifying Breath before it finishes turning a target to stone?

Calculate the Ultraradical

Isn't the detector always measuring, and thus always collapsing the state?

Impossible violin chord, how to fix this?

Lost passport and visa, tried to reapply, got rejected twice. What are my next steps?

Is it possible to take a database offline when doing a backup using an SQL job?

How big would the ice ball have to be to deliver all the water at once?

Booting Ubuntu from USB drive on MSI motherboard -- EVERYTHING fails

How to compare integers in TeX?

How does Monks' Improved Unarmored Movement work out of combat?

How to study endgames?

Should I be an author on another PhD student's paper if I went to their meetings and gave advice?

How deep is the liquid in a half-full hemisphere?

Is the "spacetime" the same thing as the mathematical 4th dimension?

Would an object shot from earth fall into the sun?

How to level a picture frame hung on a single nail?

Why most footers have a background color has a divider of section?

Realistically, how much do you need to start investing?

Implementation of a Thread Pool in C++

Why is STARTTLS used when it can be downgraded very easily?

Is it possible for a company to grow but its stock price stays the same or decrease?

Can a passenger predict that an airline is about to go bankrupt?



Adding a route in Laravel as the last route, from a composer module?


Laravel controllers and routes in packages?Laravel dynamic routesLaravel Custom User Roles & Permissions based on routesLaravel 5 Route Model Binding not working on serverLaravel 5, calling function inside compose@ViewComposer logs fatal error and returns result as expectedGlobal route in Laravel 5routing rules and orders in laravel 5Laravel 5.2 error message not shownLaravel 5.4 Modules: NotFoundHttpException in RouteCollection.php line 161Custom Tool is not showing View, Laravel Nova






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am making a module for Laravel, and for the ease of reusability, I am making it as a separate composer module.



In this module, I have to define a catch-all route, but I dont want it to override any of the manualy added routes, in the project.



Does anyone have a good idea how I can get this behaviour?



I am registering my route in the ServiceProviders boot() method like this:



public function boot()

$this->loadMigrationsFrom(__DIR__.'/migrations');
$this->loadRoutesFrom(__DIR__.'/routes/routes.php');



and the routes.php is also rather simple:



$regex = ".*";

Route::namespace('Asator\Runepost\Controllers')
->middleware(['web', DynamicContent::class])
->group(function($route) use ($regex)
$route->any('any', 'RunepostFrontController')->where('any', $regex);
);


Is it possible to somehow add the route as the last route, after the manually added routes has run?










share|improve this question






























    0















    I am making a module for Laravel, and for the ease of reusability, I am making it as a separate composer module.



    In this module, I have to define a catch-all route, but I dont want it to override any of the manualy added routes, in the project.



    Does anyone have a good idea how I can get this behaviour?



    I am registering my route in the ServiceProviders boot() method like this:



    public function boot()

    $this->loadMigrationsFrom(__DIR__.'/migrations');
    $this->loadRoutesFrom(__DIR__.'/routes/routes.php');



    and the routes.php is also rather simple:



    $regex = ".*";

    Route::namespace('Asator\Runepost\Controllers')
    ->middleware(['web', DynamicContent::class])
    ->group(function($route) use ($regex)
    $route->any('any', 'RunepostFrontController')->where('any', $regex);
    );


    Is it possible to somehow add the route as the last route, after the manually added routes has run?










    share|improve this question


























      0












      0








      0








      I am making a module for Laravel, and for the ease of reusability, I am making it as a separate composer module.



      In this module, I have to define a catch-all route, but I dont want it to override any of the manualy added routes, in the project.



      Does anyone have a good idea how I can get this behaviour?



      I am registering my route in the ServiceProviders boot() method like this:



      public function boot()

      $this->loadMigrationsFrom(__DIR__.'/migrations');
      $this->loadRoutesFrom(__DIR__.'/routes/routes.php');



      and the routes.php is also rather simple:



      $regex = ".*";

      Route::namespace('Asator\Runepost\Controllers')
      ->middleware(['web', DynamicContent::class])
      ->group(function($route) use ($regex)
      $route->any('any', 'RunepostFrontController')->where('any', $regex);
      );


      Is it possible to somehow add the route as the last route, after the manually added routes has run?










      share|improve this question














      I am making a module for Laravel, and for the ease of reusability, I am making it as a separate composer module.



      In this module, I have to define a catch-all route, but I dont want it to override any of the manualy added routes, in the project.



      Does anyone have a good idea how I can get this behaviour?



      I am registering my route in the ServiceProviders boot() method like this:



      public function boot()

      $this->loadMigrationsFrom(__DIR__.'/migrations');
      $this->loadRoutesFrom(__DIR__.'/routes/routes.php');



      and the routes.php is also rather simple:



      $regex = ".*";

      Route::namespace('Asator\Runepost\Controllers')
      ->middleware(['web', DynamicContent::class])
      ->group(function($route) use ($regex)
      $route->any('any', 'RunepostFrontController')->where('any', $regex);
      );


      Is it possible to somehow add the route as the last route, after the manually added routes has run?







      laravel laravel-routing






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 20:07









      Dennis NielsenDennis Nielsen

      134 bronze badges




      134 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          0
















          Just add your module's ServiceProvider after the App's RouteServiceProvider in config/app.php and make sure your catch-all-route is the last route of your module's routes.






          share|improve this answer

























          • oh yes, that could do it thanks :) I am using auto-discovery in composer.json, do you know of a way to prioritize how it discopvers it? Otherwise I will just have to add it manually, it would just be cool if possible :)

            – Dennis Nielsen
            Mar 29 at 11:42












          • See Taylor's medium post on how to disable autodiscover for particular packages: medium.com/@taylorotwell/…

            – jakub_jo
            Apr 1 at 13:20













          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55406038%2fadding-a-route-in-laravel-as-the-last-route-from-a-composer-module%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0
















          Just add your module's ServiceProvider after the App's RouteServiceProvider in config/app.php and make sure your catch-all-route is the last route of your module's routes.






          share|improve this answer

























          • oh yes, that could do it thanks :) I am using auto-discovery in composer.json, do you know of a way to prioritize how it discopvers it? Otherwise I will just have to add it manually, it would just be cool if possible :)

            – Dennis Nielsen
            Mar 29 at 11:42












          • See Taylor's medium post on how to disable autodiscover for particular packages: medium.com/@taylorotwell/…

            – jakub_jo
            Apr 1 at 13:20















          0
















          Just add your module's ServiceProvider after the App's RouteServiceProvider in config/app.php and make sure your catch-all-route is the last route of your module's routes.






          share|improve this answer

























          • oh yes, that could do it thanks :) I am using auto-discovery in composer.json, do you know of a way to prioritize how it discopvers it? Otherwise I will just have to add it manually, it would just be cool if possible :)

            – Dennis Nielsen
            Mar 29 at 11:42












          • See Taylor's medium post on how to disable autodiscover for particular packages: medium.com/@taylorotwell/…

            – jakub_jo
            Apr 1 at 13:20













          0














          0










          0









          Just add your module's ServiceProvider after the App's RouteServiceProvider in config/app.php and make sure your catch-all-route is the last route of your module's routes.






          share|improve this answer













          Just add your module's ServiceProvider after the App's RouteServiceProvider in config/app.php and make sure your catch-all-route is the last route of your module's routes.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 28 at 22:45









          jakub_jojakub_jo

          7746 silver badges17 bronze badges




          7746 silver badges17 bronze badges















          • oh yes, that could do it thanks :) I am using auto-discovery in composer.json, do you know of a way to prioritize how it discopvers it? Otherwise I will just have to add it manually, it would just be cool if possible :)

            – Dennis Nielsen
            Mar 29 at 11:42












          • See Taylor's medium post on how to disable autodiscover for particular packages: medium.com/@taylorotwell/…

            – jakub_jo
            Apr 1 at 13:20

















          • oh yes, that could do it thanks :) I am using auto-discovery in composer.json, do you know of a way to prioritize how it discopvers it? Otherwise I will just have to add it manually, it would just be cool if possible :)

            – Dennis Nielsen
            Mar 29 at 11:42












          • See Taylor's medium post on how to disable autodiscover for particular packages: medium.com/@taylorotwell/…

            – jakub_jo
            Apr 1 at 13:20
















          oh yes, that could do it thanks :) I am using auto-discovery in composer.json, do you know of a way to prioritize how it discopvers it? Otherwise I will just have to add it manually, it would just be cool if possible :)

          – Dennis Nielsen
          Mar 29 at 11:42






          oh yes, that could do it thanks :) I am using auto-discovery in composer.json, do you know of a way to prioritize how it discopvers it? Otherwise I will just have to add it manually, it would just be cool if possible :)

          – Dennis Nielsen
          Mar 29 at 11:42














          See Taylor's medium post on how to disable autodiscover for particular packages: medium.com/@taylorotwell/…

          – jakub_jo
          Apr 1 at 13:20





          See Taylor's medium post on how to disable autodiscover for particular packages: medium.com/@taylorotwell/…

          – jakub_jo
          Apr 1 at 13:20




















          draft saved

          draft discarded















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55406038%2fadding-a-route-in-laravel-as-the-last-route-from-a-composer-module%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현