app/Http/Controllers/ProductController.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)
    {
        return Product::create([
            'name'=>$request->input('name'),
            'slug'=>$request->input('slug'),
            'description'=>$request->input('description'),
            'price'=>$request->input('price')
        ]);
    }
public function store ( Request $ request ) { return Product :: create ( [ 'name' => $ request -> input ( 'name' ) , 'slug' => $ request -> input ( 'slug' ) , 'description' => $ request -> input ( 'description' ) , 'price' => $ request -> input ( 'price' ) ] ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .