Skip to content

Commit

Permalink
Correcting view cell docs to show both array and string parameter styles
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnieezell committed Jul 11, 2016
1 parent 5237f22 commit 32606a8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion user_guide_src/source/general/views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,12 @@ Cell Parameters
---------------

You can further refine the call by passing a string with a list of parameters in the second parameter that are passed
to the method as an array of key/value pairs::
to the method as an array of key/value pairs, or a comma-seperated string of key/value pairs::

// Passing Parameter Array
<?= view_cell('\App\Libraries\Blog::recentPosts', ['category' => 'codeigniter', 'limit' => 5]) ?>

// Passing Parameter String
<?= view_cell('\App\Libraries\Blog::recentPosts', 'category=codeigniter, limit=5') ?>

public function recentPosts(array $params=[])
Expand Down

0 comments on commit 32606a8

Please sign in to comment.