Skip to content

Commit

Permalink
Switching to named parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Daren Sipes committed Apr 24, 2024
1 parent 427b095 commit e55d3ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/bake/element/Controller/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
{% set belongsTo = Bake.aliasExtractor(modelObj, 'BelongsTo') %}
{% if belongsTo %}
$query = $this->{{ currentModelName }}
->find('search', ['search' => $this->request->getQueryParams()])
->find('search', search: $this->request->getQueryParams())
->contain({{ Bake.exportArray(belongsTo)|raw }});
{% else %}
$query = $this->{{ currentModelName }}->find('search', ['search' => $this->request->getQueryParams()]);
$query = $this->{{ currentModelName }}->find('search', search: $this->request->getQueryParams());
{% endif %}
${{ pluralName }} = $this->paginate($query);

Expand Down

0 comments on commit e55d3ff

Please sign in to comment.