app/Http/Controllers/Api/CustomerController.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)
    {
        $inputs = request()->all();
        $customer = new Customer;
        $customer->first_name = $inputs['first_name'];
        $customer->last_name = $inputs['last_name'];
        $customer->email = $inputs['email'];
        $customer->save();
        return response()->json($customer);
    }
public function store ( Request $ request ) { $ inputs = request ( ) -> all ( ) ; $ customer = new Customer ; $ customer -> first_name = $ inputs [ 'first_name' ] ; $ customer -> last_name = $ inputs [ 'last_name' ] ; $ customer -> email = $ inputs [ 'email' ] ; $ customer -> save ( ) ; return response ( ) -> json ( $ customer ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .