app/Http/Controllers/User/UserController.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, $id = 0)
    {
        $data = [
            'name' => $request->name,
            'email' => $request->email,
            'password' => Hash::make($request->password),
        ];
        $createOrUpdate = User::updateOrCreate(['id' => $id], $data);
        return redirect('home');
    }
public function store ( Request $ request , $ id = 0 ) { $ data = [ 'name' => $ request -> name , 'email' => $ request -> email , 'password' => Hash :: make ( $ request -> password ) , ] ; $ createOrUpdate = User :: updateOrCreate ( [ 'id' => $ id ] , $ data ) ; return redirect ( 'home' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .