@@ -150,10 +150,10 @@ return [
150150 |-----------------------------------------------------------------------------
151151 |
152152 */
153- 'news_feeds' => array(
153+ 'news_feeds' => [
154154 'timeline' => 'timeline',
155155 'timeline_aggregated' => 'timeline_aggregated',
156- )
156+ ]
157157```
158158
159159And that should get you off and running with Stream-Laravel. Have lots of fun!
@@ -221,7 +221,7 @@ class Pin extends Eloquent {
221221
222222 public function activityExtraData()
223223 {
224- return array( 'is_retweet'=> $this->is_retweet) ;
224+ return [ 'is_retweet' => $this->is_retweet] ;
225225 }
226226```
227227
@@ -281,7 +281,7 @@ class Tweet extends Eloquent {
281281 {
282282 if ($this->isRetweet) {
283283 $targetFeed = FeedManager::getNotificationFeed($this->parent->user->id);
284- return array( $targetFeed) ;
284+ return [ $targetFeed] ;
285285 }
286286 }
287287```
@@ -300,7 +300,7 @@ class Follow extends Eloquent {
300300 public function activityNotify()
301301 {
302302 $targetFeed = FeedManager::getNotificationFeed($this->target->id);
303- return array( $targetFeed) ;
303+ return [ $targetFeed] ;
304304 }
305305```
306306
@@ -331,7 +331,7 @@ $enricher = new Enrich();
331331$feed = FeedManager::getNewsFeeds(Auth::id())['timeline'];
332332$activities = $feed->getActivities(0,25)['results'];
333333$activities = $enricher->enrichActivities($activities);
334- return View::make('feed', array( 'activities'=> $activities) );
334+ return View::make('feed', [ 'activities' => $activities] );
335335```
336336
337337
@@ -346,7 +346,7 @@ For convenience we includes a basic view:
346346 <div class="container">
347347 <div class="container-pins">
348348 @foreach ($activities as $activity)
349- @include('stream-laravel::render_activity', array( 'activity'=> $activity) )
349+ @include('stream-laravel::render_activity', [ 'activity' => $activity] )
350350 @endforeach
351351 </div>
352352 </div>
@@ -361,7 +361,7 @@ If you need to support different kind of templates for the same activity, you ca
361361
362362The example below will use the view activity/homepage_like.html
363363```
364- @include('stream-laravel::render_activity', array( 'activity'=> $activity, 'prefix'=> 'homepage') )
364+ @include('stream-laravel::render_activity', [ 'activity' => $activity, 'prefix' => 'homepage'] )
365365```
366366
367367
@@ -383,11 +383,11 @@ class Pin extends Eloquent {
383383 public function activityExtraData()
384384 {
385385 $ref = Utils::createModelReference($this->parentTweet);
386- return array( 'parent_tweet' => $ref) ;
386+ return [ 'parent_tweet' => $ref] ;
387387 }
388388
389389// tell the enricher to enrich parent_tweet
390- $enricher = new Enrich(array( 'actor', 'object', 'parent_tweet') );
390+ $enricher = new Enrich([ 'actor', 'object', 'parent_tweet'] );
391391$activities = $feed->getActivities(0,25)['results'];
392392$activities = $enricher->enrichActivities($activities);
393393```
@@ -402,7 +402,7 @@ class Pin extends Eloquent {
402402
403403 public function activityLazyLoading()
404404 {
405- return array( 'user') ;
405+ return [ 'user'] ;
406406 }
407407```
408408
0 commit comments