Store a newly created page in storage.

@return Response
167803
public function store()
    {
        $attributes = request()->validate(Page::$rules, Page::$messages);

        $attributes['is_header'] = boolval(input('is_header'));
        $attributes['is_hidden'] = boolval(input('is_hidden'));
        $attributes['is_footer'] = boolval(input('is_footer'));
        $attributes['is_featured'] = boolval(input('is_featured'));
        $attributes['url_parent_id'] = ($attributes['url_parent_id'] == 0 ? $attributes['parent_id'] : $attributes['url_parent_id']);

        $page = $this->createEntry(Page::class, $attributes);

        if ($page) {
            $page->updateUrl()->save();
            $page->banners()->sync(input('banners'));
        }

        return redirect_to_resource();
    }
249842
public function store(SeoPagesRequest $request)
    {
        $input = $request->all();

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

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

        return redirect(route('seo_page.edit', ['id' => $record->id]));
    }
677499
public function store()
    {
        $attributes = request()->validate(DocumentCategory::$rules, DocumentCategory::$messages);

        $category = $this->createEntry(DocumentCategory::class, $attributes);

        return redirect_to_resource();
    }
1012780
public function store(PageRequest $request)
    {
        try {
            $data              = $request->all();
            $data['user_id']   = user_id();
            $data['user_type'] = user_type();
            $data              = $this->repository->create($data);
            $message           = trans('messages.success.created', ['Module' => trans('page::page.name')]);
            $code              = 204;
            $status            = 'success';
            $url               = guard_url('page/page/' . $page->getRouteKey());
        } catch (Exception $e) {
            $message = $e->getMessage();
            $code    = 400;
            $status  = 'error';
            $url     = guard_url('page/page');
        }
        return compact('data', 'message', 'code', 'status', 'url');
    }
983947
public function store()
	{
		$email = mb_strtolower(Input::get('email'));

		$password = Input::get('password');

		if ($this->users->login($email, $password, Input::get('remember') == 'yes'))
		{
			return Redirect::route('wardrobe.admin.index');
		}

		return Redirect::back()
			->withInput()
			->with('login_errors', true);
	}
922479
public function store()
    {
        $class = $this->model;

        $this->validate(request(), $this->getValidationRules());

        // Create
        $model = new $class($this->input);
        return $model->save()
            ? [
                'success' => ucfirst($this->readableResourceType()) . ' created successfully.',
                'model' => $model->toArray(),
            ]
            : ['error' => 'There was a problem saving the ' . $this->readableResourceType() . '.'];
    }
1056409
public function store()
    {
        $this->validate($this->request, [
            'name'     => 'required',
            'resource' => 'required|alpha_num',
            'slug'     => 'required|unique:permissions,slug',
        ]);

        $permission = Permission::create($this->request->all());
        $permission->syncRoles($this->request->get('roles', []));

        return redirect()->route('administrator.permissions.index');
    }
952961
public function store()
    {
        // TODO: to clean

        if (!Input::hasFile('file')) {
            return $this->jsonErrorResponse('"file" is required.');
        }

        Subbly::events()->fire('subbly.upload:creating', array());

        $file      = Input::file('file');
        $file_type = Input::get('file_type', 'product_image');

        $destination = app_upload($file_type);
        $publicPath  = public_upload($file_type);
        $filename    = sprintf('%s.%s',
            uniqid(),
            $file->getClientOriginalExtension()
        );

        $inputFile = Input::all();

        unset($inputFile['file']);

        $fileData = array(
          'file' => array_merge($inputFile, array(
              'filename'  => $filename, 'file_path' => sprintf('%s/%s', $publicPath, $filename),
          )),
        );

        $uploadSuccess = $file->move($destination, $filename);

        if ($uploadSuccess) {
            Subbly::events()->fire('subbly.upload:created', $fileData);
        } else {
            Subbly::events()->fire('subbly.upload:error', $fileData);
        }

        return $this->jsonResponse($fileData,
        array(
            'status' => array(
                'code'    => 201,
                'message' => 'Upload done',
            ),
        ));
    }
1222452
function Save()
    {
        $this->pageRights->Save();
        if (!$this->rights)
        {
            $this->rights = new BackendSiteRights();
        }
        
        $this->rights->SetEdit($this->Value('Edit'));
        $this->rights->SetRemove($this->Value('Remove'));
        $this->rights->SetPageRights($this->pageRights->Rights());
        $this->rights->Save();
    }
1048835
public function store()
    {
        // Check whether the object has ever been stored.
        if ($this->isNew) {
            Logger::get()->debug('Storing new entity ' . get_class($this) . '...');
            // Create the record. Get an ID back.
            $this->id = $this->getDataSource()->create($this->getFieldsData());
            // Store this object in the appropriate factory for further use.
            $this->getFactory()->registerEntity($this);
        } else {
            Logger::get()->debug('Updating entity ' . get_class($this) . ":{$this->id}...");
            $this->getDataSource()->update($this->id, $this->getFieldsData());
        }

        // Once stored, the entity is no longer new.
        $this->isNew = false;
    }
258531
public function store()
    {
        $request = $this->makeRequest('store');
        $model = $this->service->create($request);

        if(is_a($model, \Exception::class)) {

            return $this->getErrorResource($model);

        } else {

            return $this->maybeMakeResource('single', $model, 201);
        }

    }
309450
public function store(Request $request)
    {
        $response = $this->repository->create($request->all());
        return Response::apiResponse([
            'data' => $response
        ]);
    }
830807
private function store()
    {
        $settings = [];
        foreach ($this->settings as $key => $value) {
            $settings[$key] = serialize($value);
        }
        file_put_contents($this->cacheFile, json_encode($settings));
    }
78341
public function add()
    {
        $page = $this->Pages->newEntity();

        if ($this->request->is('post')) {
            $page = $this->Pages->patchEntity($page, $this->request->getData());

            if ($this->Pages->save($page)) {
                $this->Flash->success(I18N_OPERATION_OK);

                return $this->redirect(['action' => 'index']);
            }

            $this->Flash->error(I18N_OPERATION_NOT_OK);
        }

        $this->set(compact('page'));
    }
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.');
    }
995050
protected function Init()
    {
        $this->page = new Page(Request::GetData('page'));
        $this->parent = Page::Schema()->ByID(Request::GetData('parent'));
        $this->previous = Page::Schema()->ByID(Request::GetData('previous'));
        $this->site = $this->page->Exists() ? $this->page->GetSite() : 
            Site::Schema()->ByID(Request::GetData('site'));
        
        $this->dateFormat = Trans('Core.DateFormat');
        $this->InitPageRights();
        
        if (!$this->page->Exists() && !$this->site->Exists())
        {
            Response::Redirect(BackendRouter::ModuleUrl(new SiteList()));
            return true;
        }
        $this->AddLayoutField();
        $this->AddNameField();
        $this->AddUrlField();
        $this->AddTitleField();
        $this->AddDescriptionField();
        $this->AddKeywordsField();
        $this->AddMenuAccessField();
        $this->AddUserGroupField();
        $this->AddGuestsOnlyField();
        $this->AddMemberGroupField();
        $this->AddPublishField();
        $this->AddSubmit();
        $this->AddPublishFromDateField();
        $this->AddPublishFromHourField();
        $this->AddPublishFromMinuteField();
        $this->AddPublishToDateField();
        $this->AddPublishToHourField();
        $this->AddPublishToMinuteField();
        $this->AddSitemapRelevanceField();        
        $this->AddSitemapChangeFrequencyField();
        $this->AddTypeField();
        $this->AddRedirectTargetSelector();
        return parent::Init();
    }
1054477
public function store($request)
    {
        $this->fireEvent('creating', [$request]);

        $created = $this->model->create($request);

        $this->fireEvent('created', [$created]);

        return $created;
    }