本文整理汇总了PHP中Document::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Document::all方法的具体用法?PHP Document::all怎么用?PHP Document::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Document
的用法示例。
在下文中一共展示了Document::all方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Display a listing of branches
*
* @return Response
*/
public function index()
{
$documents = Document::all();
return View::make('documents.index', compact('documents'));
}
示例2: get_documents
public function get_documents()
{
return View::make('tenants.documents')->with('documents', Document::all());
}
示例3: providerDocuments
public function providerDocuments()
{
$walker_id = Session::get('walker_id');
$documents = Document::all();
$walker_document = WalkerDocument::where('walker_id', $walker_id)->get();
$walker = Walker::find($walker_id);
$status = 0;
foreach ($documents as $document) {
if (!$document) {
$status = -1;
} else {
$status = 0;
}
}
if ($walker->is_approved) {
$status = 1;
}
return View::make('web.providerDocuments')->with('title', 'My Documents')->with('documents', $documents)->with('walker_document', $walker_document)->with('status', $status);
}
示例4: foreach
<h2>Files Overview</h2>
<?php
print '<table>';
print '<tr><th>document</th><th>download</th><th>stream</th><th>YouTube</th></tr>';
foreach (Document::all() as $d) {
print '<tr>';
print '<td><a href="/a/document/' . $d->id . '">' . htmlspecialchars($d->fullname()) . '</a></td>';
$ff = $d->file_found('download') === false ? '<span class="highlight">NONE</span>' : '<a href="/download' . $d->download_relative_uri() . '">dl</a>';
print '<td>' . $ff . '</td>';
$ff = $d->file_found('stream') === false ? '<span class="highlight">NONE</span>' : '<a href="/stream/' . $d->id . '">see</a>';
print '<td>' . $ff . '</td>';
$ff = $d->youtube() ? '<a href="http://www.youtube.com/watch?v=' . $d->youtube() . '">view</a>' : '<span class="highlight">NONE</span>';
print '<td>' . $ff . '</td>';
print '</tr>';
}
print '</table>';
示例5: walker_documents
public function walker_documents()
{
$walker_id = Request::segment(4);
$walker = Walker::find($walker_id);
$documents = Document::all();
$walker_document = WalkerDocument::where('walker_id', $walker_id)->get();
return View::make('walker_document_list')->with('title', 'Driver Documents')->with('page', 'walkers')->with('walker', $walker)->with('documents', $documents)->with('walker_document', $walker_document);
}
示例6: get_index
public function get_index()
{
return View::make('documents.index')->with('documents', Document::all());
}