Is there any possible means of returning posts whether or not they have active comments in database?

|
m23mim 2022-07-31 19:15:58
Rao Aadil 2022-07-31 19:15:15
changing in app.php dsnt wrk?

No

Rao Aadil 2022-07-31 19:16:38
m23mim 2022-07-31 19:15:58
No

Thats sad😁

m23mim 2022-07-31 19:17:59
Rao Aadil 2022-07-31 19:16:38
Thats sad😁

I know. Now I have the stored dateTime in database with the right timezone

Rao Aadil 2022-07-31 19:18:17
m23mim 2022-07-31 18:58:40
I did and the database store the right timezone that I choosed but the code render the UTC (default timezone for laravel)

You can contact your hosting provider they might help

m23mim 2022-07-31 19:18:20
but when I show the date and time
m23mim 2022-07-31 19:18:38
It take the default laravel timezone
m23mim 2022-07-31 19:19:32
Rao Aadil 2022-07-31 19:18:17
You can contact your hosting provider they might help

I changed the server timezone using terminal so I don’t think it’s the server problem

Rao Aadil 2022-07-31 19:20:19
m23mim 2022-07-31 19:19:32
I changed the server timezone using terminal so I don’t think it’s the server problem

https://stackoverflow.com/questions/18810359/changing-timezone-of-a-retrieved-date-in-php

Changing timezone of a retrieved date in phpStack Overflow
I am retrieving a date in format of 2013-09-15 08:45:00 from the database, which is set in UTC and I need to change it to another dynamic timezone (based on user)

So far I’ve got

$datetime = $row…

Rao Aadil 2022-07-31 19:20:30
see if this helps
m23mim 2022-07-31 19:20:39
In database: 2022-07-31 19:06:08 vs when I print it: 2022-07-31/16:06:08
Rao Aadil 2022-07-31 19:20:58
Rao Aadil 2022-07-31 19:20:19
https://stackoverflow.com/questions/18810359/changing-timezone-of-a-retrieved-date-in-php

try this on the comming date from DB

m23mim 2022-07-31 19:23:22
Rao Aadil 2022-07-31 19:20:58
try this on the comming date from DB

How can I try it when I have a list of data with one field for date.

Rao Aadil 2022-07-31 19:24:01
m23mim 2022-07-31 19:23:22
How can I try it when I have a list of data with one field for date.

data will be in an array right?

Rao Aadil 2022-07-31 19:24:15
run foreach loop for it
m23mim 2022-07-31 19:24:23
When I use for example Africa continent it works fine but it doesn’t work for Asia continent
m23mim 2022-07-31 19:24:47
That’s weird
Rao Aadil 2022-07-31 19:25:46
m23mim 2022-07-31 19:24:23
When I use for example Africa continent it works fine but it doesn’t work for Asia continent

https://stackoverflow.com/questions/46423806/laravel-changing-timezone-not-reflecting-the-correct-time

Laravel changing timezone not reflecting the correct timeStack Overflow
I am changing the timezone into Asia/Singapore at config/app.php, but when I try to do a date(“Y-m-d H:i:s”); the result is still in UTC.

Is there anything in Laravel that overrides that timezone …

m23mim 2022-07-31 19:26:06
Rao Aadil 2022-07-31 19:24:15
run foreach loop for it

I don’t think it’s a good idea to run a loop for all retrieved data

Rao Aadil 2022-07-31 19:26:28
you can map array if you dnt want to run loop
Rao Aadil 2022-07-31 19:27:37
m23mim 2022-07-31 19:26:06
I don’t think it’s a good idea to run a loop for all retrieved data

$callback = function($element) {
return $element[‘title’];
}
$results = array_map($callback, $array);

m23mim 2022-07-31 19:29:02
Rao Aadil 2022-07-31 19:25:46
https://stackoverflow.com/questions/46423806/laravel-changing-timezone-not-reflecting-the-correct-time

Still not working

m23mim 2022-07-31 19:32:25
Rao Aadil 2022-07-31 19:26:28
you can map array if you dnt want to run loop

I know but I don’t think it’s a good idea because I have so many tables and I used the date for mathematical operations inside the code so I wish it works fine without further code

Rao Aadil 2022-07-31 19:33:45
m23mim 2022-07-31 19:32:25
I know but I don’t think it’s a good idea because I have so many tables and I used the date for mathematical operations inside the code so I wish it works fine without further code

buts it not working. 😁
and I am out of stackoverflow now😁

Rao Aadil 2022-07-31 19:33:56
keep debuging
m23mim 2022-07-31 19:35:38
Rao Aadil 2022-07-31 19:33:45
buts it not working. 😁
and I am out of stackoverflow now😁

I swear i tried everything about this subject on stackoverflow πŸ˜‚

Rao Aadil 2022-07-31 19:36:19
m23mim 2022-07-31 19:35:38
I swear i tried everything about this subject on stackoverflow πŸ˜‚

yeah all the best 😁

m23mim 2022-07-31 19:36:40
Rao Aadil 2022-07-31 19:36:19
yeah all the best 😁

Thank you

Rao Aadil 2022-07-31 19:37:18
m23mim 2022-07-31 19:36:40
Thank you

let me vknw when u find solution

m23mim 2022-07-31 19:37:38
Rao Aadil 2022-07-31 19:37:18
let me vknw when u find solution

I will

DesolatorMagno 2022-07-31 19:42:31
m23mim 2022-07-31 19:20:39
In database: 2022-07-31 19:06:08 vs when I print it: 2022-07-31/16:06:08

But what time zone take inside the database?

DesolatorMagno 2022-07-31 19:43:31
Carbon tell you the time zone of the element, and Laravel use the time zone configure for the system.
m23mim 2022-07-31 19:47:29
DesolatorMagno 2022-07-31 19:42:31
But what time zone take inside the database?

“Asia/Baghdad” the same that I add in config/app.php

m23mim 2022-07-31 19:49:50
DesolatorMagno 2022-07-31 19:43:31
Carbon tell you the time zone of the element, and Laravel use the time zone configure for the system.

You mean the operating system?

DesolatorMagno 2022-07-31 19:52:49
No, the app
m23mim 2022-07-31 19:56:53
DesolatorMagno 2022-07-31 19:52:49
No, the app

For example when I use America/Adak or any other place it shows the right time but when I use “Asia/Baghdad” it shows UTC time

DesolatorMagno 2022-07-31 20:09:47
That’s weird.
Denno_IT 2022-07-31 21:17:58
laravel_discuss-131551.jpg
Someone help me resolve this please
ailiya518 2022-07-31 21:27:06
July has passed, and we will soon usher in a happy August. Everyone works hard✌️
Simran 2022-07-31 22:32:46
Anyone needs free stress counseling can reach me.. ✨✨
Weatherman12 2022-07-31 22:39:14
DIGITAL OCEAN PORTAL FOR SALE
OPEN PORT
YOU CAN CREATE 10 WHMS OR 10 RDPS

BEST PORTAL FOR WHM

DM ME @WEATHERMAN12

ESCROW ACCEPTED

Bright 2022-07-31 23:35:21
laravel_discuss-131557.jpg
React firebase todo app
Ohannesburg 2022-07-31 23:47:58
Bright 2022-07-31 23:35:21
React firebase todo app

War crime

Bright 2022-07-31 23:48:25
Hahahah
Ohannesburg 2022-07-31 23:49:22
Get used to sending screenshots boi, thats literally blasphemy
rlawjddn00 2022-08-01 02:55:31
‘type’ => ‘required|in:good,bad’,
rlawjddn00 2022-08-01 02:55:41
Is it correct?
DesolatorMagno 2022-08-01 02:56:07
seems fine to me.
rlawjddn00 2022-08-01 02:57:07
thx
Aman 2022-08-01 03:29:08
Denno_IT 2022-07-31 21:17:58
Someone help me resolve this please

I feel you haven’t started mysql server

Gidi 2022-08-01 03:41:48
Hello Greetings.
Situation
Post::with(comments)

Returns only posts that have comments in database.

Is there any possible means of returning posts whether or not they have active comments in database?

|