mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
added marking to admin booking index
hide roles in user model hide user from booking model
This commit is contained in:
+2
-1
@@ -7,7 +7,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Booking extends Model
|
||||
{
|
||||
// protected $guarded = [];
|
||||
protected $hidden = array("user_id",
|
||||
protected $hidden = array( "user",
|
||||
"user_id",
|
||||
"rate_id",
|
||||
"rmb_book_amount",
|
||||
"rmb_book_pay_method",
|
||||
|
||||
@@ -76,7 +76,7 @@ class BookingController extends Controller
|
||||
|
||||
public function adminIndex(){
|
||||
$user = Auth::user();
|
||||
$bookings = Booking::select('id', 'created_at', 'admin_status', 'rate', 'term', 'amount', 'bia', 'verification_status')
|
||||
$bookings = Booking::select('user_id', 'id', 'created_at', 'admin_status', 'rate', 'term', 'amount', 'bia', 'verification_status')
|
||||
->orderby('updated_at','desc')
|
||||
->get();
|
||||
|
||||
@@ -125,7 +125,8 @@ class BookingController extends Controller
|
||||
break;
|
||||
default:
|
||||
$status_desc = "";
|
||||
}
|
||||
}
|
||||
$booking->marking = $booking->user->marking;
|
||||
$booking->status_desc = $status_desc;
|
||||
}
|
||||
return $bookings;
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class User extends Authenticatable implements JWTSubject
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
'password', 'remember_token', 'roles'
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user