From 8711bb3d85a9a3a823d1bbb08d146c075714c2cd Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 21 Sep 2011 22:00:06 -0500 Subject: [PATCH] added better comments to arr class. --- application/views/home/index.php | 2 +- laravel/arr.php | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/application/views/home/index.php b/application/views/home/index.php index 3c51d86b..51afb94b 100644 --- a/application/views/home/index.php +++ b/application/views/home/index.php @@ -73,7 +73,7 @@

You have successfully installed the Laravel framework. Laravel is a simple framework - to help web artisans create beautiful, creative applications using elegant, expressive + that helps web artisans create beautiful, creative applications using elegant, expressive syntax. You'll love using it.

diff --git a/laravel/arr.php b/laravel/arr.php index 349a1929..2e4c869f 100644 --- a/laravel/arr.php +++ b/laravel/arr.php @@ -1,12 +1,20 @@ - + * // Get the $array['user']['name'] value from the array + * $name = Arr::get($array, 'user.name'); + * + * // Return a default from if the specified item doesn't exist + * $name = Arr::get($array, 'user.name', 'Taylor'); + * + * * @param array $array * @param string $key * @param mixed $default