Created
February 1, 2021 15:36
-
-
Save stevepop/fc62dc3aa0b64b229591e2d013aee90c to your computer and use it in GitHub Desktop.
Revisions
-
stevepop created this gist
Feb 1, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ <?php Class MedicationController extends Controller { public function update(MedicationInventoryRequest $request) { $validated = $request->validated(); $this->updateInventory($validated); return redirect()->back(303) ->with('message', 'Medication quantity added successfully'); } } // FormRequest public function rules() { return [ 'medication_id' => 'required|integer', 'quantity' => 'required|integer', 'action' => 'required', ]; }