本文整理汇总了PHP中Supplier::lists方法的典型用法代码示例。如果您正苦于以下问题:PHP Supplier::lists方法的具体用法?PHP Supplier::lists怎么用?PHP Supplier::lists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Supplier
的用法示例。
在下文中一共展示了Supplier::lists方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Display a listing of the resource.
* GET /sttb
*
* @return Response
*/
public function index()
{
$query = DB::table('STTB')->select('no_STTB')->orderBy('no_STTB', 'desc')->first();
$inisial = 'STB';
if (!isset($query)) {
$kd = $inisial . '001';
} else {
$kode = substr($query->no_STTB, 3);
$kode = $kode + 1;
if ($kode > 0) {
$kd = $inisial . '00' . $kode;
if ($kode > 9) {
$kd = $inisial . '0' . $kode;
if ($kode > 99) {
$kd = $inisial . $kode;
}
}
}
}
$data = array('supplier' => Supplier::lists('nm_supp', 'id_supp'), 'noSTTB' => $kd);
return View::make('transaksi.STTB', $data);
}
示例2: create
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
$commodities = Commodity::lists('name', 'id');
$suppliers = Supplier::lists('name', 'id');
return View::make('receipt.create')->with('commodities', $commodities)->with('suppliers', $suppliers);
}
示例3: newOrder
public function newOrder()
{
// $products = DB::table('tblInventory')
// ->join('tblProducts', function($join)
// {
// $join->on('tblInventory.strProdID','=','tblProducts.strProdID');
// })->get();
$products = DB::table('tblProducts')->get();
$suppliers = Supplier::lists('strSuppCompanyName', 'strSuppID');
$data = array('suppliers' => $suppliers);
$ids = DB::table('tblOrders')->select('strOrdersID')->orderBy('updated_at', 'desc')->orderBy('strOrdersID', 'desc')->take(1)->get();
$ID = $ids["0"]->strOrdersID;
$newID = $this->smart($ID);
Session::put('orderqueue', $newID);
$ordProd = OrderProduct::all();
return View::make('neworder')->with('products', $products)->with('data', $data)->with('newID', $newID)->with('ordProd', $ordProd);
}
示例4: create
/**
* Show the form for creating a new resource.
* GET /stocks/create
*
* @return Response
*/
public function create()
{
//show the form
$suppliers = Supplier::lists('name', 'id');
return View::make('stocks.new')->with('title', 'New Stock')->with('suppliers', compact('suppliers'));
}