/** * Write a post. * * @return mixed */ public function create() { $content = Content::newPostInstance(); $content->setAttribute('format', $this->editorFormat); $this->authorize('create', $content); set_meta('title', 'Write a Post'); return view('orchestra/story::admin.editor', ['content' => $content, 'url' => handles('orchestra::storycms/posts'), 'method' => 'POST']); }
/** * Show Dashboard. * * @return mixed */ public function show() { $content = Content::newPostInstance(); if (Gate::denies('create', $content)) { return view('orchestra/story::admin.home'); } return $this->writePost($content); }