Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8454111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:56:21+00:00 2026-06-10T11:56:21+00:00

Can someone point to me how this is done? I want to define plugin

  • 0

Can someone point to me how this is done? I want to define plugin specific routes in a config file within the plugin’s folder itself.

At the moment I am simply defining routes that are for plugins in my main routes.php file. Which can obviously get very long. So I want to refactor it out to a separate config file and place it in the plugin’s folder.

But I saw that there is a code that actually loads plugin-specific routes automatically but I cannot find any documentation on this.
In “config/routes.php”, there is a line that says

/**
 * Load all plugin routes.  See the CakePlugin documentation on 
 * how to customize the loading of plugin routes.
 */
CakePlugin::routes();

Searching through plugin routing here is on a totally different subject. And the plugin documentation mentions nothing about this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:56:22+00:00Added an answer on June 10, 2026 at 11:56 am

    Check out the documentation in this section: Plugin Configuration.

    First, add your routes to app/Plugin/YourPlugin/Config/routes.php

    And do this in app/Config/bootstrap.php:

    <?php
    CakePlugin::loadAll(array(
        'Blog' => array('routes' => true),
        'ContactManager' => array('bootstrap' => true),
        'WebmasterTools' => array('bootstrap' => true, 'routes' => true),
    ));
    

    And it will load all your available plugins, but add the extras you list in the array parameter. If you want to load routes for all your available plugins, do this in app/Config/bootstrap.php:

    <?php
    CakePlugin::loadAll(array(
        array('bootstrap' => true)
    ));
    

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It seems to me this should match just fine. Can someone point out to
I'm staring blank on this error, so I hope someone here can point out
Just wondering if someone can point me in the right direction. I want to
Hope someone can help me or point me in the right direction. I want
If some one can point me in the right direction for this code for
can someone point me to some methods for perspective ray casting. I have seen
Can someone point me to an article that shows the dropdownlist being populated from
Can someone point me to some tutorial on how to set up a ping
Can someone point out a couple of good quality tutorials/pages for donut caching? Like
Can someone point me in the right direction of some information on using: <%#

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.