CakePHP admin section routing and redirecting

后端 未结 4 1759
醉梦人生
醉梦人生 2021-02-20 09:49

I\'m struggling with the concept of creating an admin section in CakePHP-project. (version 2.3.5)

I have uncommented the line in Config/core.php:

Configu         


        
4条回答
  •  野的像风
    2021-02-20 10:32

    I have another solution. Admin panel for website has another graphics, javasctipt etc, so I do in my app folders:

    app_name
      +Model
      +Plugin
      +admin
      +front
    

    Yes admin is in another folder, so I can for example set another cookie to login in admin area only plugins and model are the same. This folder structure needs some configuration in bootstrap.php:

      App::build(array(
          'Plugin' => array(ROOT . DS . 'Plugin' . DS),
          'Model' => array(ROOT . DS . 'Model' . DS),
          'Model/Behavior' => array(ROOT . DS . 'Model' . DS . 'Behavior' . DS),
      ));
    

    Maybe is crazy for you but i prefer this solution that use admin routes.

提交回复
热议问题