public function store(CreatePostRequest $request)
    {
        $this->authorize(PostsPolicy::PERMISSION_CREATE);

        $post = Post::createOne($request->getValidatedData());

        $this->transNotification('created', ['title' => $post->title], $post->toArray());

        return redirect()->route('admin::blog.posts.show', [$post]);
    }
public function store(CreatePostRequest $request)
    {
        $this->authorize(PostsPolicy::PERMISSION_CREATE);

        $post = Post::createOne($request->getValidatedData());

        $this->transNotification('created', ['title' => $post->title], $post->toArray());

        return redirect()->route('admin::blog.posts.show', [$post]);
    }
public function store ( CreatePostRequest $ request ) { $ this -> authorize ( PostsPolicy :: PERMISSION_CREATE ) ; $ post = Post :: createOne ( $ request -> getValidatedData ( ) ) ; $ this -> transNotification ( 'created' , [ 'title' => $ post -> title ] , $ post -> toArray ( ) ) ; return redirect ( ) -> route ( 'admin::blog.posts.show' , [ $ post ] ) ; }
Store the post.

@param  \Arcanesoft\Blog\Http\Requests\Admin\Posts\CreatePostRequest  $request

@return \Illuminate\Http\RedirectResponse
Store the post .