app/Http/Controllers/CouponController.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)
    {
        $coupon=new coupon;
        $coupon->couponname=$request->couponname;
        $coupon->amount=$request->amount;
        $coupon->save();
       return back();
    }
public function store ( Request $ request ) { $ coupon = new coupon ; $ coupon -> couponname = $ request -> couponname ; $ coupon -> amount = $ request -> amount ; $ coupon -> save ( ) ; return back ( ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .