コード例 #1
0
 public function createPermission($fid)
 {
     $feature = Feature::find($fid);
     if (!isset($feature)) {
         return Redirect::to('/crm/feature')->withMessage(Generate::message('Invalid', 'Invalid Feature or Feature has been deleted'));
     }
     $all_positions = Permission::getAllCurrentPosition();
     $icons = SysConfig::getSystemConfig('Icons');
     $icon_bgs = SysConfig::getSystemConfig('IconBG');
     $all_pages = Permission::getAllCurrentPages();
     $all_prompt_types = Permission::getAllCurrentPromptTypes();
     return view('backend.feature.create_permission')->with('content_title', 'Create New Permission')->with('feature', $feature)->with('icons', $icons)->with('icon_bgs', $icon_bgs)->with('all_prompt_types', $all_prompt_types)->with('all_pages', $all_pages)->with('all_positions', $all_positions)->with('module', $this->module);
 }
コード例 #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $feature = Feature::find($id);
     $feature->group()->detach();
     $feature->delete();
     return redirect()->route('features.index')->with('messageDelete', 'Delete feature success!');
 }
コード例 #3
0
ファイル: Feature.php プロジェクト: purplebleed/hljtnbdm
 public function shows($id)
 {
     return Feature::find($id);
 }