app/Http/Controllers/PostController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $post = new Post([
            'title' => $request->title,
            'description' => $request->description,
        ]);
        $post->save();
        return ($this->index());
    }
public function store ( Request $ request ) { $ post = new Post ( [ 'title' => $ request -> title , 'description' => $ request -> description , ] ) ; $ post -> save ( ) ; return ( $ this -> index ( ) ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
//echo "store"; //dd($request);