本文整理汇总了PHP中Room::select方法的典型用法代码示例。如果您正苦于以下问题:PHP Room::select方法的具体用法?PHP Room::select怎么用?PHP Room::select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Room
的用法示例。
在下文中一共展示了Room::select方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
} else {
return '0';
}
return 'hey';
});
Route::get('user', 'UsersController@index');
Route::post('user/create', 'UsersController@store');
Route::post('user/{id}/delete', 'UsersController@destroy');
Route::post('user/{id}/update', 'UsersController@update');
Route::get('settings', function () {
$cpage = 'settings';
return View::make('adminview.settings.index', compact('cpage'));
});
Route::get('booking', function () {
$cpage = 'booklst';
$r = Room::select('id', 'name')->get();
return View::make('adminview.booking.index', compact('cpage', 'r'));
});
Route::get('getbookinglist', 'BookingController@bookingList');
Route::post('getbookinglist/search', 'BookingController@searchList');
Route::post('getbookinginfo/{id}', 'BookingController@searchBooking');
Route::post('booking/{id}/update', 'BookingController@update');
Route::post('booking/{id}/payment', 'BookingController@payment');
Route::post('currentbooking/save', function () {
$i = Input::all();
$membershipDiscount = null;
if (isset($i['membership_id'])) {
$membership = Customer::where('membership_id', $i['membership_id'])->first();
if ($membership) {
$membershipDiscount = $membership->current_discount;
}
示例2: Room
<?php
require 'tables.php';
$rooms = new Room();
$data = $rooms->select();
$response = json_encode($data);
echo $response;