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


PHP Item::all方法代碼示例

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


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

示例1: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show()
 {
     $info = new Item();
     $info->setTable($this->getLoginUsername());
     //$info->setTable($this->getLoginUsername());
     $list = $info->all($this->getLoginUsername(), array('taskname', 'deadline', 'description', 'important'));
     return view('auth.profile')->with(array('username' => $this->getLoginUsername(), 'list' => $list));
 }
開發者ID:kakaacac,項目名稱:loudengdeng,代碼行數:14,代碼來源:ToDoListController.php

示例2: map

    public function map(){
 
		$items = Item::all();
                //$items = Item::distance(0.1,'45.05,7.6667')->get();
 
		return view('items.map')->with(['items'=>$items]);
 
	}
開發者ID:habibimroncn,項目名稱:tutorial-laravel,代碼行數:8,代碼來源:ItemsController.php

示例3: newsale

 function newsale(Request $request)
 {
     $values = $request->all();
     $sale = Sale::create($values);
     $sales = Sale::all();
     $items = Item::all();
     $vendors = Vendor::all();
     return view('stockmaster.sales', ['vendors' => $vendors, 'newsale' => $sale, 'items' => $items, 'user' => Auth::user()]);
 }
開發者ID:sanandshajilal,項目名稱:Trash-it,代碼行數:9,代碼來源:StockMasterController.php

示例4: __invoke

 public function __invoke() : View
 {
     $extractShorName = function ($item) {
         return $item->state->getShortName();
     };
     $allItems = Item::all();
     $newItems = P::pipe(P::filter(P::pipe($extractShorName, P::eq('new'))), 'P::size');
     return view('main')->with('items', $allItems)->with('remaining_item_count', $newItems($allItems));
 }
開發者ID:luijar,項目名稱:fp-php,代碼行數:9,代碼來源:Main.php

示例5: booking

 public function booking(Request $request)
 {
     $values = $request->all();
     $booking = Booking::create($values);
     $user = Auth::user();
     $items = Item::all();
     $i = 0;
     return view('customer', ['i' => $i, 'booking' => $booking, 'user' => $user, 'items' => $items]);
 }
開發者ID:sanandshajilal,項目名稱:Trash-it,代碼行數:9,代碼來源:CustomerController.php

示例6: viewCatDets

 /**
  * @return $this
  */
 public function viewCatDets($catName)
 {
     $imDets = DB::select(DB::raw("SELECT * FROM items WHERE catRef = (SELECT catID FROM categories WHERE catName ='{$catName}')"));
     //  $catDets = DB::select(DB::raw("SELECT * FROM categories WHERE "))
     $categories = Category::all();
     $items = Item::all();
     return view('pages/Main/categoryView', compact('categories', 'items', 'imDets', 'catName'));
     //return view('pages/Main/categoryView')->with('imDets',$imDets);
 }
開發者ID:AMFIRNAS,項目名稱:PaintBuddy,代碼行數:12,代碼來源:mPageController.php

示例7: create

 public function create()
 {
     $items = Item::all();
     if (count($items) < 1) {
         return redirect()->action('ItemsController@index')->with('message', 'Anda belum memasukan data produk');
     } else {
         return view('itemin.create', compact('items'));
     }
 }
開發者ID:Herlanggaws,項目名稱:givani,代碼行數:9,代碼來源:ItemInController.php

示例8: viewCatDets

 /**
  * @param $catName
  * this function handle the viewing of category of products
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function viewCatDets($catName)
 {
     //retreive the categories images with product details based on the user click
     $imDets = DB::select(DB::raw("SELECT * FROM items WHERE catRef = (SELECT catID FROM categories WHERE catName ='{$catName}')"));
     $categories = Category::all();
     $items = Item::all();
     $data = session()->get('items');
     //        return json_encode($imDets);
     return view('pages/Main/categoryView', compact('categories', 'items', 'imDets', 'catName', 'data'));
 }
開發者ID:Legolas000,項目名稱:PaintBuddy,代碼行數:15,代碼來源:mPageController.php

示例9: countNewAndDoneItems

 /**
  * Get counts of items that are new and which ones are completed
  * @return Tuple(int, int, int)
  */
 public static function countNewAndDoneItems() : Tuple
 {
     $countNewAndPast = P::partition(function ($item) {
         $name = $item->state->getShortname();
         return $name === 'expired' || $name === 'completed';
     }, Item::all());
     list($done, $new) = $countNewAndPast;
     $counts = Tuple::create('integer', 'integer');
     return $counts(count($done), count($new));
 }
開發者ID:luijar,項目名稱:fp-php,代碼行數:14,代碼來源:ItemService.php

示例10: getUserProfile

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function getUserProfile()
 {
     $user = Auth::user();
     $items = Item::all();
     $profileList = Profile::where('user_id', '=', 1)->lists('characterName', 'id');
     // $request = /* where (useSkills = profile_id)
     //               return [item_id => [tier_id], item_id => [tier_id]] */
     $itemList = useSkill::where('profile_id', '=', 1)->join('items', 'items.id', '=', 'item_id')->join('tiers', 'tiers.id', '=', 'tier_id')->groupBy('items.name')->get(['items.name', 'tiers.tier']);
     return view('profile.profile', compact('items', 'profileList', 'itemList'));
 }
開發者ID:MiikroKimiro,項目名稱:lchalbion2,代碼行數:15,代碼來源:ProfileController.php

示例11: handle

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $items = Item::all();
     foreach ($items as $item) {
         $imgs = glob(storage_path('app') . "/prodimag/" . trim($item->codigo) . "*-G*");
         $item->imagenes = count($imgs) > 0 ? true : false;
         $item->imagen = count($imgs) > 0 ? substr($imgs[rand(0, count($imgs) - 1)], -15, 9) : NULL;
         $item->save();
     }
 }
開發者ID:ateszki,項目名稱:nh,代碼行數:15,代碼來源:ItemImagenes.php

示例12: index

 /**
  * Get all items from the database and display it. 
  * Go to: list.app/items
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $items = array();
     foreach (Item::all() as $item) {
         if (\Auth::user()->id == $item->user_id) {
             array_push($items, $item);
         }
     }
     return view('items.index', compact('items'));
 }
開發者ID:chrisguo1,項目名稱:To-Do-List,代碼行數:15,代碼來源:ItemsController.php

示例13: postRegister

 public function postRegister(Request $request)
 {
     $validator = $this->registrar->validator($request->all());
     if ($validator->fails()) {
         $items = Item::all();
         $i = 0;
         return view('main', ['i' => $i, 'items' => $items, 'errors' => $validator->errors(), 'input' => $request->all()]);
     }
     $user = $this->registrar->create($request->all());
     $this->auth->login($user);
     return $this->authenticated($request, $user);
 }
開發者ID:sanandshajilal,項目名稱:Trash-it,代碼行數:12,代碼來源:AuthController.php

示例14: getItems

 public function getItems()
 {
     $itemlist = Item::all();
     $items = Item::all();
     $itemspack = [];
     foreach ($items as $item) {
         $uom = BulkUnit::where('uom_id', $item->uom_id)->lists('name');
         $itemspack[$item->uom_id] = $uom;
     }
     $jsonified = json_encode($itemspack);
     $data = ['items' => $jsonified];
     return view('operations/purchase/index', $data, compact('itemlist'));
 }
開發者ID:esmeromichael,項目名稱:grading,代碼行數:13,代碼來源:PurchaseRequestController.php

示例15: booking

 function booking(Request $request)
 {
     $items = Item::all();
     $i = 0;
     $values = $request->all();
     $rules = ['name' => 'required|max:100', 'adrsl1' => 'required', 'adrsl2' => 'required', 'place' => 'required', 'pin' => 'required|digits:6', 'email' => 'required|email', 'phone' => 'required|digits:10', 'pickdate' => 'required|date_format:Y-m-d|after:today'];
     $validator = Validator::make($request->all(), $rules);
     if ($validator->fails()) {
         return view('main', ['i' => $i, 'items' => $items, 'req_errors' => $validator->errors(), 'req_inputs' => $request->all()]);
         // ['status'=>'fail','error'=>'invalid data',,];
     }
     $booking = Booking::create($values);
     return view('main', ['i' => $i, 'booking' => $booking, 'items' => $items]);
 }
開發者ID:sanandshajilal,項目名稱:Trash-it,代碼行數:14,代碼來源:MainController.php


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