Store a new Location
@param  \Illuminate\Http\Request $request current Request object
@return \Illuminate\Http\Response JSON of the created Location
187269
public function store(Request $request)
    {
        $this->authorize('store', Location::class);
        /** @noinspection PhpUndefinedMethodInspection */
        $request->validate(['name' => 'required|max:128']);
        $location = new Location();
        $location->team_id = $this->userContext()->team_id;
        $location->name = $request->name;
        $location->save();
        return fractal($location, new LocationTransformer())
            ->withResourceName('location')
            ->respond();
    }
897552
public function store(Request $request) {
		$rules = [
			'sitename_ar'    => 'required',
			'sitename_en'    => 'required',
			'sitename_fr'    => 'required',
			'email'          => 'required',
			'logo'           => 'sometimes|nullable|'.it()->image(),
			'icon'           => 'sometimes|nullable|'.it()->image(),
			'system_status'  => 'required',
			'system_message' => '',
		];
		$data = $this->validate(request(), $rules, [], [
				'sitename_ar'    => trans('admin.sitename_ar'),
				'sitename_en'    => trans('admin.sitename_en'),
				'sitename_fr'    => trans('admin.sitename_fr'),
				'email'          => trans('admin.email'),
				'logo'           => trans('admin.logo'),
				'icon'           => trans('admin.icon'),
				'system_status'  => trans('admin.system_status'),
				'system_message' => trans('admin.system_message'),
			]);
		if (request()->hasFile('logo')) {
			$data['logo'] = it()->upload('logo', 'setting');
		}
		if (request()->hasFile('icon')) {
			$data['icon'] = it()->upload('icon', 'setting');
		}
		Setting::orderBy('id', 'desc')->update($data);
		session()->flash('success', trans('admin.updated'));
		return redirect(aurl('settings'));

	}
1171824
public function addAction(Request $request): Response
    {
        $form = $this->formFactory->addLocation(
            new ContentLocationAddData()
        );
        $form->handleRequest($request);

        $contentInfo = $form->getData()->getContentInfo();

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (ContentLocationAddData $data) {
                $contentInfo = $data->getContentInfo();

                foreach ($data->getNewLocations() as $newLocation) {
                    $locationCreateStruct = $this->locationService->newLocationCreateStruct($newLocation->id);
                    $this->locationService->createLocation($contentInfo, $locationCreateStruct);

                    $this->notificationHandler->success(
                        $this->translator->trans(
                            /** @Desc("Location '%name%' created.") */
                            'location.create.success',
                            ['%name%' => $newLocation->getContentInfo()->name],
                            'location'
                        )
                    );
                }

                return new RedirectResponse($this->generateUrl('_ezpublishLocation', [
                    'locationId' => $contentInfo->mainLocationId,
                    '_fragment' => LocationsTab::URI_FRAGMENT,
                ]));
            });

            if ($result instanceof Response) {
                return $result;
            }
        }

        return $this->redirect($this->generateUrl('_ezpublishLocation', [
            'locationId' => $contentInfo->mainLocationId,
            '_fragment' => LocationsTab::URI_FRAGMENT,
        ]));
    }
32895
public function store(Request $request)
    {
        try {
            $validation = app(ValidationService::class)->check(['location' => 'required']);
            if (!$validation['errors']) {
                foreach ($request->input('location') as $image) {
                    $imageSaved = $this->repository->store([
                        'location' => $image,
                        'is_published' => $request->input('is_published'),
                        'tags' => $request->input('tags'),
                    ]);
                }

                Cms::notification('Image saved successfully.', 'success');

                if (!$imageSaved) {
                    Cms::notification('Image was not saved.', 'danger');
                }
            } else {
                Cms::notification('Image could not be saved', 'danger');

                return $validation['redirect'];
            }
        } catch (Exception $e) {
            Cms::notification($e->getMessage() ?: 'Image could not be saved.', 'danger');
        }

        return redirect(route($this->routeBase.'.images.index'));
    }
296787
public function store(Request $request)
	{
		$this->validate($request, ArticleCategory::$rules, ArticleCategory::$messages);

        $this->createEntry(ArticleCategory::class, $request->only('name'));

        return redirect_to_resource();
	}
357478
public function store(Request $request)
    {
        $validator = Validator::make($request->all(), [
            'name'         => 'required|string|max:255|unique:roles',
            'display_name' => 'string|max:255',
            'description'  => 'max:1000'
        ]);

        if ($validator->fails()) {
            return response()->json(arrayView('phpsoft.users::errors/validation', [
                'errors' => $validator->errors()
            ]), 400);
        }

        $role = Role::create($request->all());

        return response()->json(arrayView('phpsoft.users::role/read', [
            'role' => $role
        ]), 201);
    }
975646
public function store(Request $request)
    {
        // Validate the form data
        $result = $this->validate($request, [
            'name' => 'required',
            'slug' => 'required|alpha_dash|unique:roles',
        ]);

        // Create the Role
        $role = Sentinel::getRoleRepository()->createModel()->create([
            'name' => trim($request->get('name')),
            'slug' => trim($request->get('slug')),
        ]);

        // Cast permissions values to boolean
        $permissions = [];
        foreach ($request->get('permissions', []) as $permission => $value) {
            $permissions[$permission] = (bool)$value;
        }

        // Set the role permissions
        $role->permissions = $permissions;
        $role->save();

        // All done
        if ($request->expectsJson()) {
            return response()->json(['role' => $role], 200);
        }

        session()->flash('success', "Role '{$role->name}' has been created.");
        return redirect()->route('roles.index');
    }
500479
public function store(HCCityRequest $request): JsonResponse
    {
        $this->connection->beginTransaction();

        try {
            /** @var HCCity $record */
            $record = $this->service->getRepository()->create($request->getRecordData());
            $record->updateTranslations($request->getTranslations());

            $this->connection->commit();
        } catch (\Throwable $e) {
            $this->connection->rollBack();

            return $this->response->error($e->getMessage());
        }

        event(new HCCityCreated($record));

        if ($request->isResponseForOptions()) {

            return $this->response->success("Created", $this->service->getRepository()->formatForOptions($record));
        } else {

            return $this->response->success("Created");
        }
    }
508873
public function store(Create $request)
    {
        $data = $request->all();

        $this->repository->create($data);

        return $this->redirect('roles.index');
    }
1225492
public function store(Request $request)
    {
        $feature = new Feature();

        
        $feature->name = $request->name;

        $feature->featuretype_id = $request->featuretype_id;
        
        $feature->description = $request->description;

        
        $feature->demonstration_URL = $request->demonstration_URL;

        if($feature->package_id == '') {
            $feature->package_id = null;

        } else {
            $feature->package_id = $request->package_id;
            
        }

        
        
        $feature->save();

        return redirect('unstarter/feature');
    }
1099547
public function store(Request $request)
    {
        foreach ($request->except(['_token', '_method']) as $key => $value) {
            $configModel = $this->repository->findByKey($key);

            if (null === $configModel) {
                $data['configuration_key'] = $key;
                $data['configuration_value'] = $value;

                $this->repository->create($data);
            } else {
                $configModel->update(['configuration_value' => $value]);
            }
        }
        return redirect()->route('admin.configuration')
            ->with('notificationText', 'All Configuration saved!');
    }
972328
public function store(Request $request)
    {
        if (!$this->can('create-' . Str::plural($this->slug), auth()->user()->id)) {
            abort(404);
        }
        // $this->newRequest = $request->all();

        $this->validation($request);

        $request = $this->HandleRequest($request);

        $model = Laramin::model($this->type->name)->create($request->toArray());

        // $this->relationAfterSaving($request, $model, $this->getInfoOfType(), true);

        Session::flash($this->flashname, $this->SessionMessage("Your {$this->slug} Has Been Succesfully Added", 'success'));

        return redirect()->route('laramin.' . $this->slug . '.index');
    }
964446
public function store(Request $request)
    {
        $data = $request->all();
        $data['resource'] = $data['controller'] . '@' . $data['method'];

        $validator = Validator::make(
            $data,
            $this->getValidationRules()
        );

        if ($validator->fails()) {
            return back()->withInput()->withErrors($validator);
        }

        Permission::create($data);

        return redirect()->action('\Aginev\Acl\Http\Controllers\PermissionController@index')
                         ->with('success', trans('acl::permission.create.created'));
    }
838893
public function store(Request $request)
	{
		$request = $this->getRequest();

		$this->getModel()->getRepository()->create($request->all());

		return $this->response()
			->success("L'élément a été créée avec succès.")
			->redirect($this->getEndpoint());
	}
709929
public function store(Request $request)
	{
		$this->validate($request, Tag::$rules, Tag::$messages);

        $row = $this->createEntry(Tag::class, $request->only('name'));

        return redirect_to_resource();
	}
193703
public function store(Request $request)
    {
        $this->validate($request, Role::$rules, Role::$messages);

        $this->createEntry(Role::class, $request->all());

        return redirect_to_resource();
    }
335122
public function store(Request $request)
    {
        $config = $request->input('config');

        foreach (array_dot($request->input('data')) as $key => $value) {
            $path = $config . '.' . $key;
            $this->destroy($path);
            if (is_array($value)) {
                $value = implode(',', $value);
            }
            Configuration::create(['key' => $path, 'value' => $value]);
        }

        return $this->notifySuccess(trans('cms::config.success', ['config' => $config]));
    }