コード例 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $users = User::all();
     $actions = ActionSchema::getActionSchema($this->module);
     $roles = Role::all();
     return view('backend.user.index')->with('content_title', 'Users')->with('users', $users)->with('actions', $actions)->with('roles', $roles)->with('module', $this->module);
 }
コード例 #2
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $role = Role::find($id);
     $actions = ActionSchema::getActionSchema($this->module);
     $permission_ids = PermissionRole::where('role_id', $id)->lists('permission_id')->toArray();
     // return $permission_ids;
     return view('backend.role.show')->with('content_title', "Role Details")->with('role', $role)->with('permission_ids', $permission_ids)->with('actions', $actions)->with('module', $this->module);
 }
コード例 #3
0
 public static function getActionSchema($module)
 {
     $permissions = [];
     $action_schemas = [];
     $permissions = Feature::getPermissionsByModule($module, 'table');
     foreach ($permissions as $permission) {
         $action_schemas['table'][] = self::action($permission);
     }
     $panel_permissions = Feature::getPermissionsByModule($module, 'panel-default');
     foreach ($panel_permissions as $panel_permission) {
         $action_schemas['panel-default'][] = self::action($panel_permission);
     }
     $panel2_permissions = Feature::getPermissionsByModule($module, 'panel-with-modal-delete');
     foreach ($panel2_permissions as $panel2_permission) {
         $action_schemas['panel-with-modal-delete'][] = ActionSchema::action($panel2_permission);
     }
     $panel3_permissions = Feature::getPermissionsByModule($module, 'user_table');
     foreach ($panel3_permissions as $panel3_permission) {
         $action_schemas['user_table'][] = ActionSchema::action($panel3_permission);
     }
     return $action_schemas;
 }
コード例 #4
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $notifications = Notification::all();
     $actions = ActionSchema::getActionSchema($this->module);
     return view('backend.notification.index')->with('content_title', 'Notifications')->with('notifications', $notifications)->with('actions', $actions)->with('module', $this->module);
 }
コード例 #5
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $posts = Post::all();
     $actions = ActionSchema::getActionSchema($this->module);
     return view('backend.post.index')->with('content_title', 'All Posts')->with('posts', $posts)->with('actions', $actions)->with('module', $this->module);
 }
コード例 #6
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $feature = Feature::find($id);
     if (!isset($feature)) {
         return Redirect::to('/crm/feature')->withMessage(Generate::message('Invalid', 'Invalid Feature or Feature has been deleted'));
     }
     $permissions = $feature->permissions;
     $actions = ActionSchema::getActionSchema($this->module);
     return view('backend.feature.show')->with('content_title', 'Feature and Permissions')->with('feature', $feature)->with('actions', $actions)->with('permissions', $permissions)->with('module', $this->module);
 }