Skip to content

Commit

Permalink
Modification made to controller
Browse files Browse the repository at this point in the history
  • Loading branch information
iamwebwiz committed Nov 23, 2017
1 parent 62962a0 commit f4234ae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/Http/Controllers/TrackingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ public function addNewTracking(Request $request)
$tracking->quantity = $request->quantity;
$tracking->shipment_mode = $request->shipment_mode;
$tracking->shipment_status = $request->shipment_status;
$tracking->save();
return redirect()->route('showAllTrackings')->with('success', 'Tracking Added Successfully!');

if ($tracking->save()) {
return redirect()->route('showAllTrackings')->with('success', 'Tracking Added Successfully!');
}
return back()->with('err', 'Oops, An Error Occured!');
}
}

0 comments on commit f4234ae

Please sign in to comment.