Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const data = {
- email: 'val1',
- password: 'val2'
- }
- const headers = {
- 'Authorization': 'Bearer ' + token,
- 'Accept': 'application/json',
- 'Content-Type': 'application/x-www-form-urlencoded',
- }
- axios.put('/api/edit', data, {headers: headers})
- .then(response => {
- dispatch({
- type: EDIT_SUCCESS,
- payload: response,
- }, console.log(response.data));
- })
- public function edit(Request $request)
- {
- $user = Auth::user();
- $input = $request->all();
- return response()->json(['success'=>$user, 'input'=> $input ], $this-> successStatus);
- }
Add Comment
Please, Sign In to add comment