public function indexJson() { $entries = Entry::all(); $response = $entries->map(function ($entry) { return $entry->asJson(); }); return Response::json($response); }
public function exportData($columns, $sessionKey = null) { $entries = Entry::all(); $entries->each(function ($subscriber) use($columns) { $subscriber->addVisible($columns); }); return $entries->toArray(); }
protected function getView($template = null) { if (empty($template)) { $template = $this->template; } $settings = ['title' => Setting::get('ex_title'), 'customer' => Setting::get('ex_customer'), 'date' => Setting::get('ex_date'), 'version' => Setting::get('ex_version'), 'disclaimer' => Setting::get('ex_disclaimer_html')]; return View::make($template, ['project_name' => Setting::get('project_name'), 'generated_at' => date('d-m-Y H:i'), 'users' => static::getUsers(), 'logbooks' => static::getLogbooks($this->logbooks), 'logbooksAll' => static::getLogbooks('all'), 'entriesAll' => Entry::all(), 'attachments' => static::getAttachments($this->logbooks), 'attachmentsAll' => Attachment::all(), 'evidences' => Evidence::all(), 'custody' => Custody::all(), 'suspects' => Suspect::all(), 'legals' => Legal::where('active', 1)->get(), 'settings' => $settings]); }
/** * Execute the console command. * * @return void */ public function fire() { // Generate groups sitemap $sitemap = App::make("sitemap"); $x = 1; foreach (Group::all() as $group) { $sitemap->add(URL::to(route('group_contents', $group->getKey())), null, '1.0', 'daily'); $sitemap->add(URL::to(route('group_contents_new', $group->getKey())), null, '1.0', 'daily'); $sitemap->add(URL::to(route('group_entries', $group->getKey())), null, '1.0', 'daily'); if (!($x % 100)) { $this->info($x . ' groups processed'); } $x++; } $this->info('All groups processed'); $sitemap->store('xml', 'sitemap-groups'); unset($sitemap); // Generate entries sitemap $sitemap = App::make("sitemap"); $x = 1; foreach (Content::all() as $content) { $route = route('content_comments_slug', [$content->getKey(), Str::slug($content->title)]); $sitemap->add(URL::to($route), $content->modified_at, '1.0', 'daily'); if (!($x % 100)) { $this->info($x . ' contents processed'); } $x++; } $this->info('All contents processed'); $sitemap->store('xml', 'sitemap-contents'); unset($sitemap); // Generate contents sitemap $sitemap = App::make("sitemap"); $x = 1; foreach (Entry::all() as $entry) { $route = route('single_entry', $entry->getKey()); $sitemap->add(URL::to($route), $entry->modified_at, '1.0', 'daily'); if (!($x % 100)) { $this->info($x . ' entries processed'); } $x++; } $this->info('All entries processed'); $sitemap->store('xml', 'sitemap-entries'); unset($sitemap); // Generate global sitemap $sitemap = App::make("sitemap"); $sitemap->addSitemap(URL::to('sitemap-groups.xml')); $sitemap->addSitemap(URL::to('sitemap-contents.xml')); $sitemap->addSitemap(URL::to('sitemap-entries.xml')); $sitemap->store('sitemapindex', 'sitemap'); }
public function getEntrylistele() { $entryler = Entry::all(); return View::make('backend.mod.entry.listele', array('entry' => $entryler)); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $entries = Entry::all(); return View::make('entries.index', compact('entries')); }
/** * Return a count of items that will be removed when group is deleted * * @param object $group Group to delete * @return string */ public function onGroupDeleteCount($group) { include_once PATH_CORE . DS . 'components' . DS . 'com_blog' . DS . 'models' . DS . 'archive.php'; $entries = Entry::all()->whereEquals('scope', 'group')->whereEquals('scope_id', $group->get('gidNumber'))->count(); return Lang::txt('PLG_GROUPS_BLOG_LOG') . ': ' . $entries; }