コード例 #1
0
 public function post_deletestep()
 {
     $input = Input::get();
     Log::write('User', 'Delete Step ID ' . Step::find($input['id'])->step . ' by ' . Auth::user()->username);
     Step::find($input['id'])->delete();
     Step::where('parentid', '=', $input['id'])->delete();
     return Menu::flowtree($input['flowid']);
 }
コード例 #2
0
ファイル: viewComposers.php プロジェクト: SerdarSanri/admin
    $editFields = Field::getEditFields($config);
    //add the view fields
    $view->primaryKey = $model::$key;
    $view->rows = ModelHelper::getRows($config, $config->sort);
    $view->editFields = $editFields;
    $view->actions = $config->actions;
    $view->filters = Field::getFilters($config);
    $view->baseUrl = $baseUrl;
    $view->assetUrl = URL::to('bundles/administrator/');
    $view->route = $route['path'] . '/';
    $view->model = isset($view->model) ? $view->model : false;
});
//admin settings view
View::composer('administrator::settings', function ($view) {
    $config = $view->config;
    $baseUrl = URL::to_route('admin_index');
    $route = parse_url($baseUrl);
    //get the edit fields
    $editFields = Field::getEditFields($config);
    //add the view fields
    $view->editFields = $editFields;
    $view->actions = $config->actions;
    $view->baseUrl = $baseUrl;
    $view->assetUrl = URL::to('bundles/administrator/');
    $view->route = $route['path'] . '/';
});
//header view
View::composer(array('administrator::partials.header', 'administrator::dashboard'), function ($view) {
    $view->menu = Menu::getMenu();
    $view->settingsPrefix = Admin\Libraries\SettingsConfig::$prefix;
});
コード例 #3
0
 public function post_deletemodule()
 {
     $input = Input::get();
     $header = Header::find($input['id']);
     $head = $header->navheader;
     $header->delete();
     $desc = Link::where('navheaderid', '=', $input['id'])->get();
     Link::where('navheaderid', '=', $input['id'])->delete();
     Log::write('System', 'Delete Navigation Module ' . $head . ' by ' . Auth::user()->username);
     foreach ($desc as $key => $value) {
         $page = Page::find($value->modulpageid)->actionalias;
         Log::write('System', 'Delete Navigation Page ' . $head . '/' . $page . ' by ' . Auth::user()->username);
     }
     return Menu::navTree();
 }