Store a newly created resource in storage.

@param \TypiCMS\Modules\Attributes\Shells\Http\Requests\FormRequest $request

@return \Illuminate\Http\RedirectResponse
497088
public function store(AttributeGroup $group, FormRequest $request)
    {
        $data = $request->all();
        $data['attribute_group_id'] = $group->id;

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

        return $this->redirect($request, $attribute);
    }
580410
public function store(Request $request, $type = null)
    {
        return $this->library->upload($request->file('file'), [
            'public_id' => basename(
                $request->file('file')->getClientOriginalName(),
                '.'.$request->file('file')->getClientOriginalExtension()
            ),
        ]);
    }
294771
public function store(Request $request, FormBuilder $formBuilder)
    {
        // Set roles that have access
        $request->user()->authorizeRoles(['admin', 'editor']);

        // Get pagetype, or fail..
        $pagetype = PageType::where('model', $request->pagetype_model)->first();

        // Get form fields
        $fields = $pagetype->fields ?: [];

        // Build the form
        $form = $formBuilder->createByArray($fields, [
            'method' => 'POST',
            'url' => route('admin.pages.page.store'),
            'name' => 'content'
        ]);

        // Validate required page fields (title, slug, status etc)
        $request->validate([
            'title' => 'bail|required|min:2|max:255',
            // 'slug' => 'required|unique',
        ]);


        // Validate custom form fields
        if (!$form->isValid()) {
            return redirect()->back()->withErrors($form->getErrors())->withInput();
        }

        // Store the post
        $page = new Page;

        // Page data
        $page->uuid = (string) Str::uuid();
        $page->title = $request->input('title');
        $page->pagetype_model = $request->input('pagetype_model');
        $page->content = $request->input('content');
        $page->status = $request->input('status') ? 2 : 1;
        $page->lang_id = 1;
        $page->user_id = 1;

        $page->save();

        flash('The page was successfully saved')->success();

        return redirect()->route('admin.pages.index');
    }
589415
public function store(CreateUserRequest $request)
    {
        $this->user->createWithRoles($request->all(), $request->roles);

        flash(trans('core::messages.resource.resource created', ['name' => trans('user::users.title.user')]));

        return redirect()->route('backend::user.user.index');
    }
1153994
public function store(Request $request)
    {
        // check if user has permissions to access this link
        if(!User::hasAccess('Tags', 'create')) {
            return $this->noPermission();
        }

        $validatorData = [
            'title' => 'required',
            'postTypeID' => 'required',
            'slug' => 'required|max:500|unique:tags',
        ];

        if(isset($request->formData['id'])) {
            // Update Tag
            $tags = Tag::findOrFail($request->formData['id']);
            $validatorData['slug'] = 'required';
        }else{
            $tags = new Tag();
            $tags->createdByUserID = Auth::user()->userID;
            $tags->postTypeID = $request->formData['postTypeID'];
        }

        // validation
        $validator = Validator::make($request->formData, $validatorData, []);
        // check validation
        if ($validator->fails()) {
            return $this->response("Please check all required fields!", 400, null, false, false, true, $validator->errors());
        }

        $tags->title         = $request->formData['title'];
        $tags->description   = $request->formData['description'];
        $tags->slug          = $request->formData['slug'];
        $tags->featuredImageID = ($request->formData['featuredImage']  !== 0 ? $request->formData['featuredImage'] : null);

        // return results
        if ($tags->save()) {
            $redirect = $this->redirect($request->formData['redirect'], $tags->tagID, $request->formData['postTypeID']);
            $result = $this->response('Tag is saved', 200, $redirect['id'], $redirect['view'], $redirect['url']);
        }else{
            $result = $this->response('Internal server error. Please try again later', 500);
        }
        return $result;
    }
1204787
public function store(Request $request)
    {
        $this->validate($request, NavigationAdmin::$rules, NavigationAdmin::$messages);

        $inputs = $request->only([
            'icon',
            'title',
            'slug',
            'description',
            'help_index_title',
            'help_index_content',
            'help_create_title',
            'help_create_content',
            'help_edit_title',
            'help_edit_content',
            'parent_id',
            'url_parent_id'
        ]);
        $inputs['is_hidden'] = boolval($request->has('is_hidden'));
        $inputs['url_parent_id'] = ($inputs['url_parent_id'] == 0 ? $inputs['parent_id'] : $inputs['url_parent_id']);

        $row = $this->createEntry(NavigationAdmin::class, $inputs);

        if ($row) {
            $row->updateUrl()->save();
            $row->roles()->attach(input('roles'));
        }

        return redirect_to_resource();
    }
1252795
public function store(Create $request)
    {
        $data = $request->all();

        $category = Category::create($data);

        return $this->redirect('categories.index');
    }
208709
public function store(Request $request)
    {
        $attributes = request()->validate(PhotoAlbum::$rules, PhotoAlbum::$messages);

        $album = $this->createEntry(PhotoAlbum::class, $attributes);

        return redirect_to_resource();
    }
579615
public function store(CreateUserRequest $request)
    {
        $user = $this->user->fill($request->except('password'));

        if($request->filled('password')) $user->password = bcrypt($request->password);
        if($request->filled('is_admin')) $user->is_admin = 1;

        $user->save();

        return redirect('admin/users');
    }
125398
public function store(Create $request)
    {
        $data = $request->all();

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

        $user->addRole($request->get('role'));

        return $this->redirect('users.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'));
    }
250286
public function store(CreateStorageRequest $request)
    {
        $this->storage->create($request->all());

        return redirect()->route('admin.product.storage.index')
            ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));
    }
120322
public function store(Request $request)
    {
        try {
            $permission = $this->permissions->save($request);
        } catch (Exception $e) {
            return $this->handleException($e, trans('soda::errors.create', ['object' => 'permission']));
        }

        return redirect()->route('soda.permissions.edit', $permission->getKey())->with('success', trans('soda::messages.created', ['object' => 'permission']));
    }
399130
public function store(Request $request)
    {
        $data = $this->validate(request(), [
            'old_url' => 'required',
            'new_url' => 'required'
        ]);

        Redirection::create($data);

        session()->flash('success', 'Redirección registrada con éxito!');
        return redirect()->route('redirecciones.index');
    }
27784
public function store(Request $request)
    {
        Role::create($request->all());

        session()->flash('success' , 'Rol creado con exito');
        return redirect()->route('roles.index');
    }
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!');
    }
163199
public function store(Request $request)
	{
		$this->authorize('blog',  Auth::user());
	
		$this->validate($request, Evento::storeRules());
		$id = \DB::transaction(function () use ($request){
			$evento = Evento::create(Evento::storeAttributes($request));

			return $evento->id;
		});
		
		return redirect(route('evento.edit', $id));
	}