Exemplo n.º 1
0
 public static function run()
 {
     if (Config::get('panel.enable')) {
         Route::get(Config::get('panel.route'), function () {
             include "../" . self::$path;
         });
         //
         Route::get(Config::get('panel.route') . "/{op}", function ($op) {
             switch ($op) {
                 case Config::get('panel.ajax')['new_seed']:
                     Seeds::add();
                     break;
                 case Config::get('panel.ajax')['exec_migration']:
                     Migrations::exec();
                     break;
                 case Config::get('panel.ajax')['rollback_migration']:
                     Migrations::rollback();
                     break;
                 case Config::get('panel.ajax')['new_migration']:
                     Migrations::add();
                     break;
                 case Config::get('panel.ajax')['new_controller']:
                     Controller::create();
                     break;
                 case Config::get('panel.ajax')['new_dir_lang']:
                     Lang::createDir();
                     break;
                 case Config::get('panel.ajax')['new_file_lang']:
                     Lang::createFile();
                     break;
                 case Config::get('panel.ajax')['new_link']:
                     Link::create();
                     break;
                 case Config::get('panel.ajax')['new_model']:
                     Model::create();
                     break;
                 case Config::get('panel.ajax')['new_view']:
                     View::create();
                     break;
                 case Config::get('panel.ajax')['exec_cos_migration']:
                     Migrations::exec_cos();
                     break;
                 case Config::get('panel.ajax')['rollback_cos_migration']:
                     Migrations::rollback_cos();
                     break;
             }
         });
     }
 }
Exemplo n.º 2
0
function call($uri, $controller, $data = null)
{
    return Route::call($uri, $controller, $data);
}