Skip to content

Commit

Permalink
Change controller stub to match 5.3 route names
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Stoimenov committed Aug 31, 2016
1 parent cb1bd46 commit cdbdd1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Console/Commands/stubs/controller.stub
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class :controller_name extends AdminController

$this->viewData['actionVerb'] = 'Create';
$this->viewData['formMethod'] = 'POST';
$this->viewData['formAction'] = 'admin.:resource.store';
$this->viewData['formAction'] = ':resource.store';

return view($this->defaultFormView, $this->viewData);
}
Expand All @@ -76,7 +76,7 @@ class :controller_name extends AdminController
'description' => ':model_name is created successfully!',
]);

return redirect(route('admin.:resource.edit', ['id' => $record->id]));
return redirect(route(':resource.edit', ['id' => $record->id]));
}

/**
Expand All @@ -93,7 +93,7 @@ class :controller_name extends AdminController
$this->viewData['record'] = $record;

$this->viewData['formMethod'] = 'PUT';
$this->viewData['formAction'] = 'admin.:resource.update';
$this->viewData['formAction'] = ':resource.update';

return view($this->defaultFormView, $this->viewData);
}
Expand Down

0 comments on commit cdbdd1f

Please sign in to comment.