app/Http/Controllers/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)
    {
        $customer = Customer::create([
            'firstname' => $request->input('firstname'),
            'lastname' => $request->input('lastname'),
            'email' => $request->input('email'),
            'address' => $request->input('address'),
            'trn_number' => $request->input('trn_number'),
            'id_type' => $request->input('id_type'),
            'id_number' => $request->input('id_number'),
            'password' => Hash::make($request->input('password')),
            'created_at' => date('Y-m-d H:i:s'),
            'created_by' => 1,
            'updated_by' => 1,
        ]);
        return redirect()->route("customers.index");
    }
public function store ( Request $ request ) { $ customer = Customer :: create ( [ 'firstname' => $ request -> input ( 'firstname' ) , 'lastname' => $ request -> input ( 'lastname' ) , 'email' => $ request -> input ( 'email' ) , 'address' => $ request -> input ( 'address' ) , 'trn_number' => $ request -> input ( 'trn_number' ) , 'id_type' => $ request -> input ( 'id_type' ) , 'id_number' => $ request -> input ( 'id_number' ) , 'password' => Hash :: make ( $ request -> input ( 'password' ) ) , 'created_at' => date ( 'Y-m-d H:i:s' ) , 'created_by' => 1 , 'updated_by' => 1 , ] ) ; return redirect ( ) -> route ( " customers.index " ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .