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