Which one do you prefer?

|
Lalit Rana 2021-06-20 14:52:39
Lalit Rana 2021-06-20 14:52:10
php artisan migrate used to create the database tables && php artisan db seed used to insert dummy data in database table

migrate will run your all migration files

rebory 2021-06-20 14:52:54
friend i need urgent help
rebory 2021-06-20 14:53:56
i have two tables categories and posts , i get successfully post from category but i need per page only 6 how i set paginate on it
Lalit Rana 2021-06-20 14:55:40
rebory 2021-06-20 14:53:56
i have two tables categories and posts , i get successfully post from category but i need per page only 6 how i set paginate on it

paginate(6) will display 6 record per page

rebory 2021-06-20 14:56:57
laravel_discuss-85970.jpg

rebory 2021-06-20 14:58:04
laravel_discuss-85971.jpg
i’m talk about this
natghi2010 2021-06-20 15:27:51
You are welcome localhost
Billygotclout 2021-06-20 15:54:54
laravel_discuss-85974.jpg
please i need help it works on the localhost but not on heroku please what do i do
Billygotclout 2021-06-20 16:04:33
Anyone?
natghi2010 2021-06-20 16:51:42
rebory 2021-06-20 14:58:04
i’m talk about this

Can you put the /div after the for each please

rebory 2021-06-20 16:57:24
natghi2010 2021-06-20 16:51:42
Can you put the /div after the for each please

It’s not html issue I told you how we rander posts using pagination, when we access post through relationship

2021-06-20 17:16:15
Which one do you prefer?
natghi2010 2021-06-20 17:46:19
rebory 2021-06-20 16:57:24
It’s not html issue I told you how we rander posts using pagination, when we access post through relationship

I know

natghi2010 2021-06-20 17:46:47
its a side tip
Billygotclout 2021-06-20 17:48:24
Billygotclout 2021-06-20 15:54:54
please i need help it works on the localhost but not on heroku please what do i do

Anyone ??

kamleshjainforme 2021-06-20 18:00:02
Code ?
Stoyt 2021-06-20 18:02:41
Billygotclout 2021-06-20 15:54:54
please i need help it works on the localhost but not on heroku please what do i do

Check spell’s

Angelafeb 2021-06-20 18:20:51
laravel_discuss-85986.jpg
Does anyone how to fix this?
KellsLTE 2021-06-20 18:25:52
Angelafeb 2021-06-20 18:20:51
Does anyone how to fix this?

This means that you’re trying to insert a record into your database but a column that isn’t nullable is empty

psarmmiey 2021-06-20 18:26:27
Angelafeb 2021-06-20 18:20:51
Does anyone how to fix this?

Set the column “no_akun” as nullable in your database. Since you’re parsing a null value or empty value into the column

Angelafeb 2021-06-20 18:27:30
Oke oke i got it thank’s guys
albertocardenas 2021-06-20 18:30:17
Angelafeb 2021-06-20 18:20:51
Does anyone how to fix this?

check the no_akun column, if you get correctly the value from the POST FORM

Angelafeb 2021-06-20 18:30:22
psarmmiey 2021-06-20 18:26:27
Set the column “no_akun” as nullable in your database. Since you’re parsing a null value or empty value into the column

I’m using phpmyadmin so it mean’s that I have to change in there?

albertocardenas 2021-06-20 18:31:25
No, probably you dont get correctly the value for this column on your form
albertocardenas 2021-06-20 18:31:37
check your form and your controller
Angelafeb 2021-06-20 18:31:50
Oke oke
Angelafeb 2021-06-20 18:32:10
Wait I’ll try
Kensy98 2021-06-20 18:34:08
laravel_discuss-85996.jpg
Hi guys i get this error when trying to update a dateTime column using Carbon::now(), please anyone to help me.
albertocardenas 2021-06-20 18:35:04
the datetime is not correctly, check the way that you insert this datetime
Kensy98 2021-06-20 18:38:18
laravel_discuss-85998.jpg
Here in my controller
NjoguAmos 2021-06-20 18:42:44
Kensy98 2021-06-20 18:38:18
Here in my controller

If I were you, I would format the date when accessing not when saving. You can easily define this using casts.

MySql saves dates as ‘YYYY-MM-DD hh:mm:ss’

albertocardenas 2021-06-20 18:43:45
I see that the sign_out_time is NULL when you try to insert on database
albertocardenas 2021-06-20 18:43:56
Check why
Kensy98 2021-06-20 18:45:23
NjoguAmos 2021-06-20 18:42:44
If I were you, I would format the date when accessing not when saving. You can easily define this using casts.

MySql saves dates as ‘YYYY-MM-DD hh:mm:ss’

I already cast the sign_in_time and sign_out_time to ‘datetime:Y-m-d H:i:s’ in my model

NjoguAmos 2021-06-20 18:46:06
albertocardenas 2021-06-20 18:43:45
I see that the sign_out_time is NULL when you try to insert on database

Probably because of the if statement. Run dd() to make sure that line is being called

|