Category : laravel

Here is the code : $bookings = Booking::where([‘service_provider_id’=> $users->id, ‘status’=> 6])->get(); $serviceCompletedCount = $bookings->count(); $userData[‘service_completed’] = $serviceCompletedCount; and foreach($users as $user) { $bookings = Booking::where([‘service_provider_id’=> $user->id, ‘status’=>6])->get(); $serviceCompletedCount = $bookings->count(); $user[‘service_completed’] = $serviceCompletedCount; } Sourc..

Read more

I’m trying to transfer data from jsTree1 (source: from API Ajax) to jsTree2, using ContextContex Plug-in menu Copy/Cut > Paste, so User can re-leveling their data in jsTree2. So, This is the first jsTree : var hris_Jstree = $(‘#jstree’).jstree({ "core": { "check_callback": true, "themes": { "responsive": true, "variant": "large", "stripes": false, }, "data": { type: ..

Read more

I am making a hotel booking app using Laravel. I am at the part where i have to filter the rooms according to the inputted date. I am using ajax to achieve this. $(‘#check-availability’).on(‘click’, function(){ var checkin_date = $(‘#check-checkin’).val(); $.ajax({ url:"{{url(‘/available_room’)}}/" + checkin_date, dataType: ‘json’, beforeSend:function(){ $(‘#room_list’).html(‘Loading’); }, success:function(res){ var r_html = ”; var input_checkin_date ..

Read more

my laravel source code and mysql database are on separate server. there is wired problem and that is database get updated asynchronously. it does not wait for database got updated and execute the next line. the job queue is disable and I do not know why this problem happens. when I add sleep(3) between database ..

Read more