hide rate id from model

fixed DB not found in rate controller
This commit is contained in:
Jack Goh
2018-07-03 17:11:30 +08:00
parent 3aab1506c4
commit c902c8db82
4 changed files with 24 additions and 11 deletions
+2 -6
View File
@@ -21,7 +21,7 @@ Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
Route::get('rate', 'RateController@show');
//Route::middleware('auth:api')->get('/user', function (Request $request) {
// return $request->user();
//});
@@ -44,7 +44,6 @@ Route::group(['middleware' => 'auth:api'], function () {
Route::post('booking/{book_id}/cancel', 'BookingController@cancel');
Route::get('/booking', 'BookingController@index');
Route::get('/user', 'UserController@show');
Route::patch('settings/profile', 'Settings\ProfileController@update');
Route::patch('settings/password', 'Settings\PasswordController@update');
});
@@ -56,7 +55,6 @@ Route::group(['middleware' => 'guest:api'], function () {
Route::post('register', 'Auth\RegisterController@create');
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail');
Route::post('password/reset', 'Auth\ResetPasswordController@reset');
Route::post('oauth/{driver}', 'Auth\OAuthController@redirectToProvider');
Route::get('oauth/{driver}/callback', 'Auth\OAuthController@handleProviderCallback')->name('oauth.callback');
});
@@ -64,14 +62,12 @@ Route::group(['middleware' => 'guest:api'], function () {
Route::group(['middleware' => ['role:admin']], function() {
Route::get('admin/booking/', 'BookingController@adminIndex');
Route::get('admin/booking/{id}', 'BookingController@adminShow');
Route::post('update-rate', 'RateController@store');
Route::put('update-rate/{rate}', 'RateController@update');
Route::delete('update-rate/{rate}', 'RateController@delete');
Route::get('update-rate', 'RateController@index');
//show current rate
Route::get('rate', 'RateController@show');
Route::get('setting-credit', 'SettingCreditController@index');
Route::get('setting-credit/{credit}', 'SettingCreditController@show');