Mercurial > packages > magicforger
diff src/Generator/Controller/stubs/controller.stub @ 5:b0b2e79ad8e6
Not exatly sure what was changed but commiting to it :)
| author | luka |
|---|---|
| date | Thu, 12 Oct 2023 19:41:04 -0400 |
| parents | 6468684362c2 |
| children | 769a17898cc0 |
line wrap: on
line diff
--- a/src/Generator/Controller/stubs/controller.stub Tue Jun 27 20:16:55 2023 -0400 +++ b/src/Generator/Controller/stubs/controller.stub Thu Oct 12 19:41:04 2023 -0400 @@ -35,10 +35,13 @@ */ public function store({{ storeRequest }} $request) { + $validated = $request->validated(); + // ${{ modelVariable }} = new {{ model }}(); //insert the values into the model + //{{ valuesForCreation }} ${{ modelVariable }}->save(); @@ -74,7 +77,11 @@ */ public function update({{ updateRequest }} $request, {{ model }} ${{ modelVariable }}) { + $validated = $request->validated(); + // Set the variables + //{{ valuesForCreation }} + ${{ modelVariable }}->save(); return redirect()->route('{{ tableName }}.index');
