Store a newly created resource in storage.

@param \TypiCMS\Modules\News\Http\Requests\FormRequest $request

@return \Illuminate\Http\RedirectResponse
164380
public function store(FormRequest $request)
    {
        $data = $request->all();
        $model = $this->repository->create($data);

        return $this->redirect($request, $model);
    }
479907
public function store(Request $request)
    {
        $this->validate($request, ['name' => 'required']);

        Permission::create($request->all());

        return redirect('admin/permissions')->with('flash_message', 'Permission added!');
    }
1201260
public function store(PostRequest $request)
    {
        $this->data = objectify($request->except([
            '_token', 'newCategory', 'newTags'
        ]));

        if (! empty($this->data->tags)) {
            $this->buildTagsArray();
        }

        $post = $this->storeOrUpdatePost();

        if ($this->status->byHash($this->data->status)->name == 'Pending review') {
            $this->mailReviewer($post);
        }

        $action = ($request->hash == '') ? 'created' : 'updated';

        $this->tracert->log('posts', $post->id, $this->auth_user->id, $action);

        $message = trans('blogify::notify.success', [
            'model' => 'Post', 'name' => $post->title, 'action' => $action
        ]);
        session()->flash('notify', ['success', $message]);

        $hash = $this->auth_user->hash;
        $this->cache->forget("autoSavedPost-$hash");

        return redirect()->route('admin.posts.index');
    }
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');
    }
1372926
public function store(Request $request)
    {
        $type = $request->get('type');

        return $this->manager()->{$type}()->store($request->all());
    }
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');
    }
992271
public function store(CreateUploadRequest $request)
    {
        $input = $request->all();

        $upload = $this->repository->create($input, null, $request->user());
        $upload->load($request->getWith());

        return $this->sendResponse($upload, 'Upload saved successfully.');
    }
673868
public
    function store(Validator $request)
    {
        $init = new InitData($request);
        Model::quickSave($init->getDataForCreate());
        flash()->success('Your Item Created');
        return redirect()->to("menus/");
    }
1294667
public function store(RoleRequest $request)
    {
        $input = $request->except('permissions');

        $record = $this->model->create($input);

        $record->syncPermissions($request->permissions);

        $this->notify([
            'type' => 'success',
            'title' => 'Successful create role!',
            'description' => 'Role is created successfully!',
        ]);

        return redirect(route('role.edit', ['id' => $record->id]));
    }
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!');
    }
78770
public function store(Request $request)
    {
        try {
            $this->roleRepositoryInterface->create($request->all());
        } catch (FormValidationException $e) {
            Flash::error($e->getMessage());

            return redirect()
              ->route('roles.create')
              ->withErrors($e->getErrors())
              ->withInput();
        }

        Flash::success(trans('dashboard::dashboard.flash.role.create.success'));

        return redirect()->route('roles.index');
    }
115982
public function store(Request $request)
    {
        $attributes = request()->validate(News::$rules, News::$messages);

        $news = $this->createEntry(News::class, $attributes);

        return redirect_to_resource();
    }
629857
public function store(Request $request)
    {
        $this->authorize('create', File::class);
        $input = $this->validator->validate('create');
        if ($request->hasFile('file')) {
            $uploadedFile = $request->file('file');
            if ($uploadedFile->isValid()) {
                try {
                    $file = $this->fileRepo->create($input, $uploadedFile, auth()->user());
                    return $this->respondWithSuccess($file, new FileTransformer);
                } catch (RepositoryValidationException $e) {
                    return $this->respondWithError($e->getMessage());
                }
            }
        }
        return $this->respondWithError('The file could not be uploaded - invalid or missing file');
    }
1261579
public function store(Request $request)
    {
        $menu = Menu::create($request->input());

        return $this->response()->item($menu, new MenuTransformer());
    }
650040
public function store(UserRequest $request)
    {
        $this->model->fill($request->all())->save();

        return $this->makeRedirect(true, 'admin.users.index', __('store'));
    }
248214
public function store(FormRequest $request)
    {
        $data = $request->all();
        $data['parent_id'] = null;
        $page = $this->repository->create($data);
        Menulinks::forgetCache();

        return $this->redirect($request, $page);
    }
533510
public function store(Request $request)
    {
        // Instantiate a new model item.
        $modelClass = $this->getModelClass();
        $item = new $modelClass;

        // Validate the request.
        $this->validate($request, $item->getValidationRules());

        // Create the new item.
        $itemData = $request->all();
        $item->fill($itemData);
        $item->save();

        $newItem = call_user_func([$this->getModelClass(), 'find'], $item->id)->toArray();
        return $this->generateResponse($this->modelTableName, $newItem);
    }