## 控制器demo
```
public function store(Request $request)
{
$this->validate($request,[
'name' => 'required|max:50',
'email' => 'required|email|unique:users|max:255',
'password'=>'required|confirmed|min:6'
]);
$user = User::create([
'name'=>$request->name,
'email'=>$request->email,
'password'=>bcrypt($request->password),
]);
session()->flash('success','welcome , going!!!');
return redirect()->route('users.show',[$user]);
}
~~~
```