Skip to content

Commit c779b93

Browse files
author
RK M
committed
update contoller erros
1 parent 7c3ca36 commit c779b93

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/stubs/Controller.stub

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ class {{modelName}}Controller extends Controller
115115
{
116116
request()->validate({{modelName}}::$rules);
117117
${{modelNameLowerCase}}->update($request->all());
118-
return redirect()->route('{{modelRoute}}.index')
119-
.with('success', '{{modelName}} updated successfully');
118+
return redirect()->route('{{modelRoute}}.index')->with('success', '{{modelName}} updated successfully');
120119
}
121120

122121
/**
@@ -130,8 +129,7 @@ class {{modelName}}Controller extends Controller
130129
public function destroy($id)
131130
{
132131
{{modelName}}::find($id)->delete();
133-
return redirect()->route('{{modelRoute}}.index')
134-
.with('success', '{{modelName}} deleted successfully');
132+
return redirect()->route('{{modelRoute}}.index')->with('success', '{{modelName}} deleted successfully');
135133
}
136134

137135
/**

0 commit comments

Comments
 (0)