Beispiel #1
0
 public function store(PageRequest $request)
 {
     $input = array_merge($request->input(), ['user_id' => $this->auth->user()->id, 'slug' => $this->page->getSlugForTitle($request->title), 'published' => (bool) $request->published]);
     $page = $this->page->create($input);
     flash(trans('core::messages.resource.resource created', ['name' => trans('page::page.title.page')]));
     return redirect()->route('backend::page.pages.index');
 }
Beispiel #2
0
    public function run()
    {
        Model::unguard();
        $data = ['template' => 'home', 'is_home' => 1, 'en' => ['title' => 'Home page', 'slug' => 'home', 'body' => '<p><strong>You made it!</strong></p>
<p>You&#39;ve installed AsgardCMS and are ready to proceed to the <a href="/en/backend">administration area</a>.</p>
<h2>What&#39;s next ?</h2>
<p>Learn how you can develop modules for AsgardCMS by reading our <a href="https://github.com/AsgardCms/Documentation">documentation</a>.</p>
', 'meta_title' => 'Home page']];
        $this->page->create($data);
    }
Beispiel #3
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  CreatePageRequest $request
  * @return Response
  */
 public function store(CreatePageRequest $request)
 {
     $this->page->create($request->all());
     flash(trans('page::messages.page created'));
     return redirect()->route('admin.page.page.index');
 }