skip to Main Content

How to add 2 hour to time string with jquery? – Laravel

I have two datetime-local input star time is for user changeable and the other one is read-only and I want to update that field by jquery. <input class="form-control" type="datetime-local" name="deliveryTime" id="DeliveryTime" required> <input class="form-control" type="datetime-local" name="deliveryTimeEnd" id="DeliveryTimeEnd" readonly> $("#DeliveryTime").on("change", function()…

VIEW QUESTION

Laravel Importing CSV throws error on rows with dates

Import.php ... return new Statement([ 'account_number' => $row['accountno'], 'account_name' => $row['name'], 'reading_date' => CarbonCarbon::createFromFormat('m/d/Y', $row['billdate']), 'due_date' => CarbonCarbon::createFromFormat('m/d/Y', $row['duedate']), ]); ... Error: IlluminateDatabaseQueryException PHP 8.1.6 9.37.0 SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect date value: '10/18/2022' for column `mubsdb`.`statements`.`due_date` at row…

VIEW QUESTION

withSum in deep nested relationship in laravel eloquent

I could not find this in the laravel docs on aggregate relationships I was able to do something like this private function refreshUsers() { $this->users = User::withSum(['taskTimeSessions'=> function ($query) { $query->whereMonth('created_at',$this->month) ->where('is_reconciled',1); }],'session_duration_in_seconds') ->get(); } But now I am trying…

VIEW QUESTION

Get Current user Login In Laravel 8

this my laravel Task Controller <?php namespace AppHttpControllers; use AppModelstask; use AppModelsUser; use IlluminateHttpRequest; use IlluminateSupportFacadesAuth; use IlluminateSupportFacadesValidator; class TaskController extends Controller { public function getTask() { $userid= Auth::user()->id; $response = task::where('id_karyawan',$userid)->get(); return response()->json($response,200); } } but i get this…

VIEW QUESTION
Back To Top
Search