当前位置: 首页>>代码示例>>PHP>>正文


PHP Item::all方法代码示例

本文整理汇总了PHP中Item::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Item::all方法的具体用法?PHP Item::all怎么用?PHP Item::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Item的用法示例。


在下文中一共展示了Item::all方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: editPackage

 /**
  * @before _secure, _vendor
  */
 public function editPackage($package_id)
 {
     $this->seo(array("title" => "Edit Packages", "view" => $this->getLayoutView()));
     $view = $this->getActionView();
     $package = Package::first(array("id = ?" => $package_id, "organization_id = ?" => $this->organization->id));
     if (!$package) {
         $this->redirect("/vendor");
     }
     $tests = Test::all(array(), array("id", "title"));
     $items = Item::all(array("package_id = ?" => $package->id));
     $sorted = array();
     foreach ($items as $i) {
         $sorted[$i->test_id] = $i;
     }
     $fields = $package->render();
     $errors = array();
     $view->set("fields", $fields);
     if (RequestMethods::post("action") == "savePackage") {
         foreach ($fields as $f) {
             $package->{$f}['name'] = RequestMethods::post($f['name']);
         }
         if ($package->validate()) {
             $package->save();
             $view->set("message", "Package Saved Successfully");
         } else {
             $errors = $package->errors;
         }
         $sorted = $this->_saveTests($package, $sorted);
     }
     $view->set("package", $package)->set("items", $sorted)->set("tests", $tests)->set("errors", $errors);
 }
开发者ID:HLitmus,项目名称:WebApp,代码行数:34,代码来源:promotion.php

示例2: index

 public static function index()
 {
     // Haetaan kaikki vaatteet tietokannasta
     $items = Item::all();
     // Renderöidään views/item kansiossa sijaitseva tiedosto index.html muuttujan $items datalla
     View::make('items/index.html', array('items' => $items));
 }
开发者ID:juhapekkamoilanen,项目名称:Tsoha-Bootstrap,代码行数:7,代码来源:item_controller.php

示例3: index

 /**
  * Display a listing of items
  *
  * @return Response
  */
 public function index()
 {
     $items = Item::all();
     $categories = Category::all();
     $item = new Item();
     return View::make('items.index', compact('items', 'categories', 'item'));
 }
开发者ID:noikiy,项目名称:posco-laravel-server,代码行数:12,代码来源:ItemsController.php

示例4: edit

 /**
  * Show the form for editing the specified order.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $items = Item::all();
     $customers = Client::all();
     $order = Order::findOrFail($id);
     return View::make('orders.edit', compact('items', 'customers', 'order'));
 }
开发者ID:kenkode,项目名称:gasexpress,代码行数:13,代码来源:OrdersController.php

示例5: stock

 public function stock()
 {
     $items = Item::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('erpreports.stockReport', compact('items', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Stock Report.pdf');
 }
开发者ID:arapmelly,项目名称:xaraerp,代码行数:7,代码来源:ErpReportsController.php

示例6: displayTask

 /**
  * Display a list of entries
  *
  * @return  void
  */
 public function displayTask()
 {
     // Get some incoming filters to apply to the entries list
     //
     // The Request::getState() method makes it easy to retain values of
     // certain variables across page accesses. This makes development much
     // simpler because we no longer has to worry about losing variable values
     // if it is left out of a form. The best example is that the form will
     // retain the proper filters even after navigating to the edit entry form
     // and back.
     $filters = array('search' => urldecode(Request::getState($this->_option . '.' . $this->_controller . '.search', 'search', '')), 'state' => urldecode(Request::getState($this->_option . '.' . $this->_controller . '.state', 'state', -1)), 'sort' => Request::getState($this->_option . '.' . $this->_controller . '.sort', 'filter_order', 'name'), 'sort_Dir' => Request::getState($this->_option . '.' . $this->_controller . '.sortdir', 'filter_order_Dir', 'ASC'));
     // Get our model
     // This is the entry point to the database and the
     // table of entries we'll be retrieving data from
     $modeld = Item::all();
     if ($filters['state'] >= 0) {
         $record->whereEquals('state', $filters['state']);
     }
     if ($search = $filters['search']) {
         $record->whereLike('name', $search);
     }
     $rows = $record->ordered('filter_order', 'filter_order_Dir')->paginated()->rows();
     // Output the view
     $this->view->set('rows', $rows)->set('filters', $filters)->display();
 }
开发者ID:hubzero,项目名称:PressForward,代码行数:30,代码来源:items.php

示例7: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     //
     $newId = Itemset::generateId();
     $items = Item::all();
     return View::make('itemset.new', ['id' => $newId, 'items' => $items]);
 }
开发者ID:NathanaelFebrianto,项目名称:Citramas,代码行数:12,代码来源:ItemsetController.php

示例8: manage

 /**
  * Manage Items
  * @before _secure, _admin
  */
 public function manage()
 {
     $this->seo(array("title" => "Items | Manage", "view" => $this->getLayoutView()));
     $view = $this->getActionView();
     $count = Item::count();
     $limit = RequestMethods::get("limit", 20);
     $page = RequestMethods::get("page", 1);
     $items = Item::all(array(), array("id", "name", "price", "tax", "period", "created", "live"), "created", "desc", $limit, $page);
     $view->set("count", $count)->set("page", $page)->set("limit", $limit)->set("items", $items);
 }
开发者ID:SwiftDeal,项目名称:detectr,代码行数:14,代码来源:plan.php

示例9: run

 public function run()
 {
     $items = Item::all();
     foreach ($items as $item) {
         $i = Item::find($item->id);
         if ($item->participant) {
             $i->event_id = $item->participant->event_id;
             $i->save();
         }
         if ($item->member) {
             $i->team_id = $item->member->team_id;
             $i->save();
         }
     }
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:15,代码来源:PaymentItemsTableSeeder.php

示例10: getAll

 public function getAll($f3)
 {
     echo json_encode(Item::all());
 }
开发者ID:selesdepselesnul,项目名称:CAI,代码行数:4,代码来源:ItemController.php

示例11: index

 /**
  * Display a listing of items
  *
  * @return Response
  */
 public function index()
 {
     $items = Item::all();
     return View::make('items.index', compact('items'));
 }
开发者ID:kenkode,项目名称:xaraerp,代码行数:10,代码来源:ItemsController.php

示例12: function

| and give it the Closure to execute when that URI is requested.
|
*/
/* Sample routes */
Route::get('fuck', function () {
    return (new ProductionItem())->getUnsoldItems();
    return Carbon::now()->addDays(2);
    return $item = ProductionItem::where('production_id', '=', '215')->where('item_id', '=', '10037')->where('status', '=', "pending")->first()->id;
    return ReportsController::generateSalesByRange();
    return View::make('hello');
    return Auth::user()->username;
    return PDF::loadView('items.barcodes')->setPaper('a6')->setOrientation('landscape')->setWarnings(false)->stream('barcodes.pdf');
});
Route::get('tt', function () {
    return Session::get('REGISTER');
    $item = Item::all();
    return PDF::loadView('items.barcodes')->setPaper('a6')->setOrientation('landscape')->setWarnings(false)->stream('barcodes.pdf');
    $prod = new ProductionItem();
    $pending = $prod->getPendingItems();
    $prod_items = $prod->getCurrentProductionsItemId();
    // return $pending[0]->remaining;
    foreach ($pending as $item) {
        print $item->item_id . " ";
        if (in_array($item->item_id, $prod_items)) {
            return "pending";
            exit;
        }
        return "not pending";
        exit;
    }
    $invoiceInfo = ['customer' => 'Raymund Santillan', 'total' => 'Php 150.00'];
开发者ID:fagray,项目名称:fposs,代码行数:31,代码来源:routes.php

示例13: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     $items = Item::all();
     return View::make('item.item', ['items' => $items]);
 }
开发者ID:NathanaelFebrianto,项目名称:Citramas,代码行数:11,代码来源:ItemController.php

示例14: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $items = Item::all();
     return $items;
 }
开发者ID:par-orillonsoft,项目名称:shopping-list,代码行数:10,代码来源:ShoppingController.php

示例15: compact

    $locations = Location::all();
    $taxes = Tax::all();
    return View::make('erporders.orderitems', compact('items', 'locations', 'taxes', 'orderitems'));
});
Route::get('purchaseitems/remove/{id}', function ($id) {
    Session::forget('orderitems', $id);
    $orderitems = Session::get('orderitems');
    $items = Item::all();
    $locations = Location::all();
    $taxes = Tax::all();
    return View::make('erporders.orderitems', compact('items', 'locations', 'taxes', 'orderitems'));
});
Route::get('quotationitems/remove/{id}', function ($id) {
    Session::forget('orderitems', $id);
    $orderitems = Session::get('orderitems');
    $items = Item::all();
    $locations = Location::all();
    $taxes = Tax::all();
    return View::make('erporders.orderitems', compact('items', 'locations', 'taxes', 'orderitems'));
});
Route::resource('stocks', 'StocksController');
Route::resource('erporders', 'ErporderssController');
Route::post('erporder/commit', function () {
    $erporder = Session::get('erporder');
    $erporderitems = Session::get('orderitems');
    $total = Input::all();
    // $client = Client: :findorfail(array_get($erporder, 'client'));
    // print_r($total);
    $order = new Erporder();
    $order->order_number = array_get($erporder, 'order_number');
    $order->client()->associate(array_get($erporder, 'client'));
开发者ID:kenkode,项目名称:umash-1,代码行数:31,代码来源:routes.php


注:本文中的Item::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。