Skip to content

Instantly share code, notes, and snippets.

@zofe
Created March 26, 2014 16:44
Show Gist options
  • Save zofe/9787701 to your computer and use it in GitHub Desktop.
Save zofe/9787701 to your computer and use it in GitHub Desktop.
<?php
class HomeController extends BaseController
{
public function showWelcome()
{
$articoli = Articolo::Articoli()->Pubblici()->take(4)->remember(10)->get();
$primopiano = $articoli->shift();
$voci = Voce::ultime()->take(3)->remember(10)->get();
$news = News::ultime()->take(6)->get();
$collaboratori = Collaboratore::homepage(20)->get();
return View::make('home', compact('primopiano','articoli','voci' ,'news', 'collaboratori'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment