本文整理汇总了PHP中Entry::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Entry::all方法的具体用法?PHP Entry::all怎么用?PHP Entry::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entry
的用法示例。
在下文中一共展示了Entry::all方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexJson
public function indexJson()
{
$entries = Entry::all();
$response = $entries->map(function ($entry) {
return $entry->asJson();
});
return Response::json($response);
}
示例2: exportData
public function exportData($columns, $sessionKey = null)
{
$entries = Entry::all();
$entries->each(function ($subscriber) use($columns) {
$subscriber->addVisible($columns);
});
return $entries->toArray();
}
示例3: getView
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]);
}
示例4: fire
/**
* 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');
}
示例5: getEntrylistele
public function getEntrylistele()
{
$entryler = Entry::all();
return View::make('backend.mod.entry.listele', array('entry' => $entryler));
}
示例6: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$entries = Entry::all();
return View::make('entries.index', compact('entries'));
}
示例7: onGroupDeleteCount
/**
* 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;
}