public function customIndex($parameters) { $parameters['profile'] = Profile::find($parameters['profile']); $parameters['areDeleteRecord'] = $this->areDeleteRecord; $parameters['routeSuffixProfile'] = $this->routeSuffixProfile; return $parameters; }
public function customIndex($parameters) { $parameters['accounts'] = EmailAccount::all(); $parameters['profiles'] = Profile::all(); $parameters['notificationsAccount'] = Preference::getValue('octopusNotificationsAccount', 8); $parameters['managerProfile'] = Preference::getValue('octopusManagerProfile', 8); return $parameters; }
public function customIndex($parameters) { $parameters['profiles'] = Profile::all(); $parameters['billingProfile'] = Preference::getValue('projectsBillingProfile', 6); $parameters['accounts'] = EmailAccount::all(); $parameters['notificationsAccount'] = Preference::getValue('projectsNotificationsAccount', 6); $parameters['hourPrice'] = Preference::getValue('projectsHourPrice', 6); return $parameters; }
public function setAllPermissions() { // get parameters from url route $parameters = $this->request->route()->parameters(); $profile = Profile::find($parameters['id']); $resources = Resource::all(); $actions = Action::all(); $permissions = []; foreach ($resources as $resource) { foreach ($actions as $action) { $permissions[] = ['profile_id_009' => $parameters['id'], 'resource_id_009' => $resource->id_007, 'action_id_009' => $action->id_008]; } } Permission::deleteRecordsProfile($parameters['id']); Permission::insert($permissions); // if profile it's same that our profile, overwrite ours permissions if ($profile->id_006 == auth('pulsar')->user()->profile_id_010) { session(['userAcl' => AclLibrary::getProfileAcl(auth('pulsar')->user()->profile_id_010)]); } return redirect()->route($this->routeSuffix, $parameters)->with(['msg' => 1, 'txtMsg' => trans('pulsar::pulsar.message_create_all_permissions', ['profile' => $profile->name_006])]); }
public function run() { Profile::insert([['id_006' => '1', 'name_006' => 'Administrador']]); }
public function editCustomRecord($parameters) { $parameters['langs'] = Lang::getActivesLangs(); $parameters['profiles'] = Profile::all(); return $parameters; }