accounts = $accounts; $this->preferences = $preferences; View::share('menu', 'home'); } public function index() { // get list setting: $pref = $this->preferences->get('frontpageAccounts', []); // get the accounts to display on the home screen: $count = $this->accounts->count(); if ($pref->data == []) { $list = $this->accounts->getActiveDefault(); } else { $list = $this->accounts->getByIds($pref->data); } // build the home screen: return View::make('index')->with('count', $count)->with('accounts', $list); } }