/**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\RedirectRespons
  */
 public function store(Request $request)
 {
     $input = $request->all();
     $input['password'] = Hash::make($input['password']);
     $user = $this->users->create($input);
     //create Blank profile
     $profile = Profile::create(['user_id' => $user->id, 'bio' => '']);
     $profile->save();
     return \Redirect::route('admin.users.index', [])->withMessage(trans('acl::user.users-controller-successfully_created'));
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     if (\Auth::user()->roles[0]->can('menu-create')) {
         $input = $request->all();
         $input['url'] = "admin/" . str_plural(Str::lower($input['name'] != 'Dashboard' ? $string = str_replace(" ", "_", $input['name']) : ''));
         $menu = $this->menus->create($input);
         foreach ($request->roles as $_id) {
             $role = Role::whereId($_id)->first();
             $menu->assign($role);
         }
         \Session::flash('flash_message', 'Menu added!');
         return \Redirect::route('admin.menus.index', [])->withMessage(trans('acl::menu.menus-controller-successfully_created'));
     }
     return \Redirect::route('admin.menus.index')->withErrors(trans('acl::dashboard.unauthorized_access'));
 }
Beispiel #3
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $admin = Role::create(['name' => 'admin', 'display_name' => 'Administrator']);
     $managePieces = Permission::create(['name' => 'manage-pieces', 'display_name' => 'create and edit pieces']);
     $admin->attachPermission($managePieces);
     $super = User::where('email', '*****@*****.**')->first()->attachRole($admin);
 }
Beispiel #4
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Role::create(['role_name' => 'ROLE_SUPER', 'description' => 'CONTROL TOTAL']);
     Role::create(['role_name' => 'ROLE_ADMIN', 'description' => 'ADMINISTRADOR']);
     Role::create(['role_name' => 'ROLE_USER', 'description' => 'USUARIO']);
     Role::create(['role_name' => 'ROLE_SELLER', 'description' => 'VENDEDOR']);
 }
Beispiel #5
0
 public function run()
 {
     DB::table('roles')->delete();
     Role::create(['abr' => 'PRL', 'role' => 'President of Lending', 'description' => "Responsible for ARM Loan Locations. This primarily includes making sure that (1) Existing ARM Loan Locations adhere to the Location Growth Profiles for loan commitments and EBT, (2) Adding new ARM Loan Locations in accordance with our Growth Strategy, (3) Marketing of ARM Loan Locations, and (4) Personnel growth within each ARM Loan Locations", 'matrix' => 1]);
     Role::create(['abr' => 'COO', 'role' => 'Chief Operating Officer', 'description' => "Responsible for (1) the day-to-day running of the critical departments of ARM, (2) establishing procedures and processes to ensure their smooth functioning, and (3) providing timely operational information and assistance to the CEO", 'matrix' => 1]);
     Role::create(['abr' => 'CEO', 'role' => 'Chief Executive Officer', 'description' => "Top executive responsible for ARM’s overall operations and performance. Serves as the main link between the board of directors (the board) and the ARM's various parts or levels, and is held responsible for ARM’s success or failure. Insures that IT and accounting meets corporate goals. Maintains and implements corporate policy, as established by the board.", 'matrix' => 1]);
     Role::create(['abr' => 'CFO', 'role' => 'Chief Financial Officer', 'matrix' => 1]);
     Role::create(['abr' => 'ABM', 'role' => 'Area Business Manager', 'description' => "For a particular ARM Loan Location(s), the ABM is responsible for (1) meeting the growth objectives of the Location Growth Profile, (2) adherence to ARM policies and procedures, (3) front line for collection of past dues, (3) development of employees, and (4) communication of objectives and opportunities.", 'matrix' => 1]);
     Role::create(['abr' => 'COM', 'role' => 'Corporate Office Manager', 'matrix' => 1]);
     Role::create(['abr' => 'OM', 'role' => 'Office Manager', 'description' => "Responsible for ARM Loan Location operations including: loan closings, loan filings, loan disbursements, office operations, and management of Office Assistant roles and responsibilities.", 'matrix' => 1]);
     Role::create(['abr' => 'OA', 'role' => 'Office Assistant', 'description' => "Responsible for specific ARM Loan Location office operations as they pertain to loan operations and other crop insurance processing.", 'matrix' => 1]);
     Role::create(['abr' => 'LBM', 'role' => 'Loan Business Manager', 'description' => "Responsible for ensuring that ARM Loan Officers and Loan Analysts are (1) trained properly and (2) perform loan analysis and loan management steps consistently. The LBM supports the growth of ARM Loan Locations.", 'matrix' => 1]);
     Role::create(['abr' => 'LO', 'role' => 'Loan Officer', 'description' => "Responsible for (1) structuring agriculture loan deals that serve the customers needs, (2) adhering to ARM policies and procedures, (3) supporting ARM’s Loan Location growth objectives as defined in the Location Growth Profile, (4) Interfacing with office staff to get the job done, (5) selling crop insurance, and (6) using loan experience to develop Loan Analysts", 'matrix' => 1]);
     Role::create(['abr' => 'LA', 'role' => 'Loan Analyst', 'description' => "Responsible for (1) structuring agriculture loan deals that serve the customers needs, (2) adhering to ARM policies and procedures, (3) supporting ARM’s Loan Location growth objectives as defined in the Location Growth Profile, (4) Interfacing with office staff to get the job done.", 'matrix' => 1]);
     Role::create(['abr' => 'LCA', 'role' => 'Loan Compliance Auditor', 'description' => ": Responsible for the quality and consistency of ARM Loans across ARM locations. The LCA serves as the corporate interface with ARM Loan Location ABM’s for loan reviews and loan past due collection.", 'matrix' => 1]);
     Role::create(['abr' => 'HRM', 'role' => 'Human Resources Manager', 'description' => "The human resource manager is directly responsible for the overall administration, coordination and evaluation of the human resource function.", 'matrix' => 1]);
     Role::create(['abr' => 'IBM', 'role' => 'Insurance Business Manager', 'matrix' => 1]);
     Role::create(['abr' => 'IAN', 'role' => 'Insurance Analyst', 'matrix' => 1]);
     Role::create(['abr' => 'CIM', 'role' => 'Corporate Insurance Manager', 'matrix' => 1]);
     Role::create(['abr' => 'IA', 'role' => 'Crop Insurance Agents', 'description' => "Responsible for marketing of crop insurance policies to the customer, adhering to ARM insurance standards, maintenance of customer APH databases, and the obtaining of applications, production reports, acreage reports, and notice of loss claims", 'matrix' => 1]);
     Role::create(['abr' => 'ITT', 'role' => 'IT Technician']);
     Role::create(['abr' => 'SUP', 'role' => 'Other Support']);
     Role::create(['abr' => 'SYS', 'role' => 'System']);
     Role::create(['abr' => 'PRI', 'role' => 'President of Insurance', 'description' => "Responsible for (1) ARM agency growth strategy, (2) insurance agency acquisitions, (3) insurance policy, and (4) ARM umbrella value to agencies.", 'matrix' => 1]);
     Role::create(['abr' => 'CRO', 'role' => 'Chief Risk Officer', 'description' => "The corporate executive tasked with assessing and mitigating significant loan risk, regulatory risk, and technological risks across ARM", 'matrix' => 1]);
     Role::create(['abr' => 'CTR', 'role' => 'Corporate Controller', 'description' => "Top managerial and financial accountant. The controller supervises the accounting department and assists management in interpreting and utilizing managerial accounting information.", 'matrix' => 1]);
     Role::create(['abr' => 'PA', 'role' => 'Principal Agent', 'description' => "Serves as the leader of an ARM Loan or Agency location’s crop insurance business; which includes (1) making sure that policies are represented and processed correctly, (2) development of ARM agents, (3) growth of policy revenue, (4) marketing of additional ARM lines of revenue, and (5) supervision of Insurance Processors and Agents", 'matrix' => 1]);
     Role::create(['abr' => 'IP', 'role' => 'Insurance Processor', 'description' => "Responsible for the support of Principal Agent, Crop Insurance Agents, and all crop insurance operations including: processing of customer insurance applications, production reports, acreage reports, filing notice of loss claims", 'matrix' => 1]);
     Role::create(['id' => 999, 'abr' => 'OPT', 'role' => 'Optional', 'description' => "Committee member", 'matrix' => 0]);
 }
Beispiel #6
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $roles = [['name' => 'Administrator', 'slug' => 'admin']];
     foreach ($roles as $role) {
         Role::create($role);
     }
 }
Beispiel #7
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('roles')->truncate();
     Role::create(['name' => 'administrator', 'display_name' => 'Administrator', 'description' => 'This person rules the roost']);
     Role::create(['name' => 'approver', 'display_name' => 'Approver', 'description' => 'User can approve or disapprove requests but can not make system changes.']);
     Role::create(['name' => 'user', 'display_name' => 'User', 'description' => 'Default role for everyone. Can submit new requests but that\'s it']);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $roles = ['Administrador', 'Coordinador TI', 'Coordinador TALLER', 'Coordinador OPERACIONES', 'Coordinador OOCC', 'Coordinador MIN', 'Coordinador MAT', 'Coordinador LAB', 'Coordinador ING', 'Coordinador FIS', 'Coordinador EYM', 'Coordinador EST', 'Coordinador BIO', 'Coordinador 5TO AÑO'];
     foreach ($roles as $role) {
         Role::create(['name' => $role]);
     }
 }
 public function store(BookingRequest $request)
 {
     $booking = array('car_type_id' => $request->car_type_id, 'number_of_passengers' => $request->number_of_passengers, 'pickup_time' => $request->pickup_date_part . ' ' . $request->pickup_time_part, 'ip_info' => $request->ip_info);
     $newBooking = Booking::create($booking);
     flash()->success('Your booking has been created!')->important();
     if (!empty($request->comment1)) {
         //children comment
         $comment1 = array('booking_id' => $newBooking->id, 'comment_type_id' => '1', 'role_id' => '1', 'comment' => $request->comment1);
         Comment::create($comment1);
     }
     if (!empty($request->comment2)) {
         //general comment
         $comment2 = array('booking_id' => $newBooking->id, 'comment_type_id' => '2', 'role_id' => '1', 'comment' => $request->comment2);
         Comment::create($comment2);
     }
     $change = array('booking_id' => $newBooking->id, 'change_type_id' => '4', 'user_id' => Auth::user()->id, 'from' => null, 'to' => null);
     Change::create($change);
     $passenger = User::firstOrNew(['email' => $request->email]);
     $passenger->name = $request->name;
     $passenger->phone = $request->phone;
     $passenger->save();
     $role = array('booking_id' => $newBooking->id, 'role_type_id' => '2', 'user_id' => $passenger->id);
     Role::create($role);
     $price = array('booking_id' => $newBooking->id, 'income_type_id' => '1', 'amount_eur' => $request->price);
     Income::create($price);
     $locationArray = $request->location;
     foreach ($request->address as $order => $address_id) {
         $route_point = null;
         $route_point = array('booking_id' => $newBooking->id, 'location_id' => $locationArray[$order], 'address_id' => $address_id, 'order' => $order);
         Route_point::create($route_point);
     }
     return redirect('bookings');
 }
Beispiel #10
0
 public function store(Request $request)
 {
     $keys = 'name,display_name,description,url';
     $data = $this->autoValidate($request, 'role.store', $keys);
     Role::create($data);
     return $this->success('', url('admin/role'));
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     $roles = ['manager' => ['users.create', 'users.delete', 'users.read', 'users.update', 'invoices.read', 'invoices.create', 'invoices.delete', 'invoices.update', 'reports.read', 'reports.update', 'reports.delete'], 'user' => ['invoices.read', 'invoices.create', 'reports.read']];
     foreach ($roles as $key => $value) {
         Role::create(['role_name' => $key, 'permissions' => json_encode($value)]);
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // Create Roles
     $subscriberRole = Role::create(['name' => '订阅者', 'slug' => 'subscriber']);
     $contributorRole = Role::create(['name' => '投稿者', 'slug' => 'contributor']);
     $authorRole = Role::create(['name' => '作者', 'slug' => 'author']);
     $editorRole = Role::create(['name' => '编辑', 'slug' => 'editor']);
     $adminRole = Role::create(['name' => '管理员', 'slug' => 'admin']);
     // Create Permission
     $createArticlePermission = Permission::create(['name' => '发布文章', 'slug' => 'article.create']);
     $uploadImagePermission = Permission::create(['name' => '上传图片', 'slug' => 'image.upload']);
     $manageArticlePermission = Permission::create(['name' => '文章管理', 'slug' => 'article.manage']);
     $manageImagePermission = Permission::create(['name' => '图片管理', 'slug' => 'image.manage']);
     $manageUserPermission = Permission::create(['name' => '用户管理', 'slug' => 'user.manage']);
     $contributorRole->assignPermission($createArticlePermission->id);
     $authorRole->assignPermission($createArticlePermission->id);
     $authorRole->assignPermission($uploadImagePermission->id);
     $editorRole->assignPermission($createArticlePermission->id);
     $editorRole->assignPermission($uploadImagePermission->id);
     $editorRole->assignPermission($manageArticlePermission->id);
     $editorRole->assignPermission($manageImagePermission->id);
     // Create User
     $admin = User::create(['name' => env('ADMIN_NAME', 'Admin'), 'email' => env('ADMIN_EMAIL', '*****@*****.**'), 'password' => bcrypt(env('ADMIN_PASSWORD', 'password'))]);
     if (!$admin->save()) {
         Log::info('Unable to create admin ' . $admin->username, (array) $admin->errors());
     } else {
         $admin->assignRole($adminRole->id);
         Log::info('Created admin "' . $admin->username . '" <' . $admin->email . '>');
     }
 }
Beispiel #13
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(Request $request)
 {
     $this->validate($request, ['name' => 'required|unique:roles|min:2|max:255', 'slug' => 'required|unique:roles|min:2|max:255', 'description' => 'max:255']);
     $input = $request->all();
     Role::create($input);
     return redirect()->route('admin.roles.index')->with('message', 'Successfully created the role!');
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request $request
  *
  * @return void
  */
 public function store(Request $request)
 {
     $this->validate($request, ['name' => 'required']);
     Role::create($request->all());
     Session::flash('flash_message', 'Role added!');
     return redirect('admin/roles');
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //
     \App\Role::create(['name' => 'super admin']);
     \App\Role::create(['name' => 'manager']);
     \App\Role::create(['name' => 'agent']);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     // Change admin login info here
     $user = User::create(['name' => 'Admin', 'email' => '*****@*****.**', 'password' => bcrypt('password')]);
     $role = Role::create(['name' => 'admin']);
     $user->roles()->save($role);
 }
Beispiel #17
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Role::create(['name' => 'manager_receive', 'label' => 'Manager of Receive.']);
     Role::create(['name' => 'manager_requesition', 'label' => 'Manager of Requesition.']);
     Role::create(['name' => 'manager_product_list', 'label' => 'Manager of Product list.']);
     Role::create(['name' => 'manager_product', 'label' => 'Manager of Product.']);
     Role::create(['name' => 'manager_product_type', 'label' => 'Manager of Product Type.']);
     Role::create(['name' => 'manager_unit', 'label' => 'Manager of Unit.']);
     Role::create(['name' => 'manager_location', 'label' => 'Manager of Location.']);
     Role::create(['name' => 'manager_project', 'label' => 'Manager of Project.']);
     Role::create(['name' => 'manager_user', 'label' => 'Manager of User.']);
     Permission::create(['name' => 'create_form', 'label' => 'Create of form.']);
     Permission::create(['name' => 'update_form', 'label' => 'Update of form.']);
     Permission::create(['name' => 'delete_form', 'label' => 'Delete of form.']);
     $roles = Role::all();
     $permissions = Permission::all();
     foreach ($roles as $role) {
         foreach ($permissions as $permission) {
             $role->givePermissionTo($permission);
         }
     }
     $user = User::whereEmail('*****@*****.**')->first();
     foreach ($roles as $role) {
         $user->assignRole($role->name);
     }
     $user = User::whereEmail('*****@*****.**')->first();
     foreach ($roles as $role) {
         $user->assignRole($role->name);
     }
 }
Beispiel #18
0
 public function run()
 {
     // DB::table('role_user')->delete();
     DB::table('roles')->delete();
     \App\Role::create(['name' => 'Admin', 'display_name' => 'Administrator', 'description' => 'Super User']);
     \App\Role::create(['name' => 'User', 'display_name' => 'User', 'description' => 'Regular User']);
 }
Beispiel #19
0
 /**
  * Run the Roles table seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('roles')->delete();
     foreach (config('appkit.default_roles') as $key) {
         Role::create(['name' => $key['name'], 'slug' => $key['slug'], 'description' => $key['description']]);
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('roles')->truncate();
     Role::create(['id' => 1, 'name' => 'super_admin']);
     Role::create(['id' => 2, 'name' => 'admin']);
     Role::create(['id' => 3, 'name' => 'user']);
 }
Beispiel #21
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $roles = ['Admin 0', 'Admin 1', 'Admin 2', 'Admin 3', 'Super Admin'];
     foreach ($roles as $rol) {
         \App\Role::create(['rol' => $rol]);
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Role::create(['id' => 1, 'name' => 'Root', 'description' => "Root Admin"]);
     Role::create(['id' => 2, 'name' => 'Admin', 'description' => 'Administrator']);
     Role::create(['id' => 3, 'name' => 'Reviewer', 'description' => 'Reviewer']);
     Role::create(['id' => 4, 'name' => 'Proposer', 'description' => 'Submit proposals']);
 }
 public function run()
 {
     // create roles
     $admin = Role::create(['name' => 'admin', 'display_name' => 'Admin', 'description' => 'performs administrative tasks', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')]);
     $cashier = Role::create(['name' => 'cashier', 'display_name' => 'Cashier', 'description' => 'performs cashier tasks', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')]);
     $user = Role::create(['name' => 'user', 'display_name' => 'Portal User', 'description' => 'performs all basic tasks like print receipt, etc...', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')]);
     // create permissions
     $editUser = Permission::create(['name' => 'edit-user', 'display_name' => 'Edit Users', 'description' => 'manage users', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')]);
     $reporting = Permission::create(['name' => 'reporting', 'display_name' => 'Print Report, Print receipt', 'description' => 'manage reports', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')]);
     $editReporting = Permission::create(['name' => 'edit-reporting', 'display_name' => 'Edit Report, Edit receipt', 'description' => 'manage reports', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')]);
     $receipt = Permission::create(['name' => 'view-receipt', 'display_name' => 'View receipt, View Billings', 'description' => 'View recipent and view billings', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')]);
     // assign permissions to roles
     $admin->attachPermissions(array($editUser, $reporting, $receipt, $editReporting));
     $cashier->attachPermissions(array($reporting, $receipt, $editReporting));
     $user->attachPermissions(array($reporting, $receipt));
     // attach admin user to admin role
     $userAdmin = User::where('email', env('ADMIN_EMAIL'))->firstOrFail();
     $userAdmin->attachRole($admin);
     // assign default role to users
     $users = User::all();
     foreach ($users as $normalUser) {
         if ($normalUser->hasRole('user')) {
             continue;
         }
         $normalUser->attachRole($user);
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Role::create(['title' => 'Admin', 'privilege_id' => 1]);
     Role::create(['title' => 'User', 'privilege_id' => 2]);
     Role::create(['title' => 'Guest', 'privilege_id' => 3]);
     Role::create(['title' => 'Teacher', 'privilege_id' => 4]);
 }
 public function run()
 {
     DB::table('users')->delete();
     User::create(['username' => 'admin', 'password' => Hash::make('admin'), 'role_id' => 1]);
     DB::table('roles')->delete();
     Role::create(['id' => 1, 'name' => "admin", 'users' => '1,2,3,4,5', 'roles' => '1,2,4,5']);
 }
Beispiel #26
0
 public function run()
 {
     DB::table('roles')->delete();
     Role::create(array('id' => 0, 'name' => 'guest'));
     Role::create(array('id' => 1, 'name' => 'admin'));
     Role::create(array('id' => 2, 'name' => 'user'));
 }
 public function postNew()
 {
     $data = Request::except('_token');
     //Validation
     $rules = ['name' => 'required|unique:roles|min:5'];
     $messages = ['name.required' => trans('app.name_required'), 'name.unique' => trans('app.name_unique'), 'name.min' => trans('app.name_min')];
     $validator = Validator::make($data, $rules, $messages);
     if ($validator->fails()) {
         return redirect('roles/new')->withErrors($validator)->withInput();
     }
     $arr = [];
     $arr['name'] = $data['name'];
     //Users
     $arr['users'] = "";
     if (isset($data['users'])) {
         foreach ($data['users'] as $h) {
             $arr['users'] .= $h . ",";
         }
     }
     //Roles
     $arr['roles'] = "";
     if (isset($data['roles'])) {
         foreach ($data['roles'] as $h) {
             $arr['roles'] .= $h . ",";
         }
     }
     //rtrim()
     foreach ($arr as $key => $value) {
         $arr[$key] = rtrim($value, ",");
     }
     //Create new
     $rec = Role::create($arr);
     return redirect()->route('roles.index')->with('successMsg', trans('app.add_save_success'));
 }
Beispiel #28
0
 public function run()
 {
     DB::table('roles')->delete();
     Role::create(['name' => 'user']);
     Role::create(['name' => 'administrator']);
     Role::create(['name' => 'super']);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('roles')->truncate();
     //insert some dummy records
     Role::create(['name' => 'Admin', 'status' => 'active']);
     /*Role::create([
             'name' => 'Project Manager',
             'status' => 'active',
             ]);
     
             Role::create([
             'name' => 'Team Lead',
             'status' => 'active',
             ]);
     
             Role::create([
             'name' => 'Developer',
             'status' => 'active',
             ]);
     
             Role::create([
             'name' => 'Designer',
             'status' => 'active',
             ]);
     
             Role::create([
             'name' => 'Tester',
             'status' => 'active',
             ]);*/
     DB::table('roles_users')->insert(['user_id' => 1, 'role_id' => 1, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()]);
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param Requests\PanelRoleRequest $request
  * @return Response
  */
 public function store(Requests\PanelRoleRequest $request)
 {
     $input = $request->all();
     $role = Role::create($input);
     $this->SyncPermissions($role, $request->input('permission_list'));
     return redirect()->route('webpanel.panel.roles.index');
 }