当前位置: 首页>>代码示例>>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;未经允许,请勿转载。