public function fetchIndex() { $title = "Письма"; $allMails = Mailer::orderBy('id', 'DESC')->paginate(20); if (Request::ajax()) { $view = "part.table_center"; } else { $view = "mail_all"; } return View::make('mail-templates::mailer.' . $view, compact("allMails", "title")); }