當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Item::all方法代碼示例

本文整理匯總了PHP中app\models\Item::all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Item::all方法的具體用法?PHP Item::all怎麽用?PHP Item::all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\models\Item的用法示例。


在下文中一共展示了Item::all方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: show

 public function show($id)
 {
     $invoice = Invoice::getInvoiceDetails($id);
     $items = Item::all();
     // print_r($items);
     return view('invoice', ['invoice' => $invoice, 'id' => $id, 'items' => $items->getArray()]);
 }
開發者ID:Rufio0425,項目名稱:school,代碼行數:7,代碼來源:InvoiceController.php

示例2: invoiceProfile

 /**
  * Add or Edit Form
  */
 public function invoiceProfile($invoice_id)
 {
     // Validation Rules
     $validator = Validator::make(['invoice_id' => $invoice_id], ['invoice_id' => 'integer']);
     // If Validation Fails
     if ($validator->fails()) {
         return redirect('/customers')->withErrors($validator->messages()->toArray());
     }
     // Get the invoice model
     $invoice = new Invoice($invoice_id);
     // Invoice Items as an array
     $items = $invoice->getItems();
     // All Items Collection
     $all_items = Item::all();
     // Return the Invoice Profile View
     return view('invoices.profile', ['invoice' => $invoice, 'items' => $items->getArray(), 'all_items' => $all_items->getArray()]);
 }
開發者ID:GobleB,項目名稱:POS-CRUD,代碼行數:20,代碼來源:InvoiceController.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $item = Item::all();
     // var_dump($item);exit;
     return view('admin.item.index', ['item' => $item]);
 }
開發者ID:cdandy,項目名稱:meta-admin,代碼行數:11,代碼來源:ItemController1.php

示例4: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $items = Item::all();
     return \View::make('list_item', compact('items'));
 }
開發者ID:Bienestar-Group,項目名稱:Bienestar,代碼行數:10,代碼來源:ItemController.php

示例5: showAll

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function showAll()
 {
     $items = \App\Models\Item::all();
     return view('toDo', ['items' => $items]);
 }
開發者ID:leanne-abarro,項目名稱:toDo,代碼行數:10,代碼來源:ItemsController.php

示例6: items

 public function items()
 {
     $items = \App\Models\Item::all();
     return \View::make('items')->with('items', $items);
 }
開發者ID:alexsynarchin,項目名稱:Itnk5,代碼行數:5,代碼來源:DashboardController.php

示例7: function

<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    $items = \App\Models\Item::all();
    return $items;
});
// ===== items route =====
Route::get('toDo', 'ItemsController@showForm');
Route::get('toDo', 'ItemsController@showAll');
Route::resource('items', 'ItemsController');
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
Route::group(['middleware' => ['web']], function () {
開發者ID:leanne-abarro,項目名稱:toDo,代碼行數:31,代碼來源:routes.php

示例8: function

<?php

// Home route to show all tasks
$app->get('/', function () {
    return view('list')->with('items', \App\Models\Item::all());
});
// Add a task
$app->post('/task/add', ['as' => 'task.add', 'uses' => 'App\\Http\\Controllers\\ListController@add']);
// Check a task as complete
$app->post('/task/check', ['as' => 'task.check', 'uses' => 'App\\Http\\Controllers\\ListController@check']);
// Uncheck a task
$app->post('/task/uncheck', ['as' => 'task.uncheck', 'uses' => 'App\\Http\\Controllers\\ListController@unCheck']);
// Remove a task
$app->post('/task/remove', ['as' => 'task.remove', 'uses' => 'App\\Http\\Controllers\\ListController@remove']);
開發者ID:emsdog,項目名稱:lumen-todo,代碼行數:14,代碼來源:routes.php

示例9: showAll

 public function showAll()
 {
     $items = Item::all();
     return view('item_all', ['items' => $items->getArray()]);
 }
開發者ID:JSHOCKEY,項目名稱:rockit_posCrud,代碼行數:5,代碼來源:ItemController.php

示例10: index

 public function index()
 {
     return Item::all()->toArray();
 }
開發者ID:suchayj,項目名稱:easymanage,代碼行數:4,代碼來源:TestController.php

示例11: index

 /**
  * 查看商品
  * 
  */
 public function index()
 {
     $item = Item::all();
     return view('item.index', ['item' => $item]);
 }
開發者ID:cdandy,項目名稱:artup,代碼行數:9,代碼來源:ItemController.php


注:本文中的app\models\Item::all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。