app/Http/Controllers/NguoiDungController.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)
    {
        $user = new User();
        $user->name = $request->name;
        $user->email = $request->email;
        $user->sodienthoai = $request->sodienthoai;
        $user->diachi = $request->diachi;
        $user->password = Hash::make($request->password);
        $user->role = $request->role;
        $user->save();
        return back()
            ->with('success','Thêm mới thành công');
    }
public function store ( Request $ request ) { $ user = new User ( ) ; $ user -> name = $ request -> name ; $ user -> email = $ request -> email ; $ user -> sodienthoai = $ request -> sodienthoai ; $ user -> diachi = $ request -> diachi ; $ user -> password = Hash :: make ( $ request -> password ) ; $ user -> role = $ request -> role ; $ user -> save ( ) ; return back ( ) -> with ( 'success' , 'Thêm mới thành công'); }
Store a newly created resource in storage.
Store a newly created resource in storage .
//