Any one little help me who is good in javascript or jquery?

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

When inserting sign_in_time the sign_out_time should be null the when in sign_out i want to update the sign_out_time to current time

Kensy98 2021-06-20 18:50:09
When in sign_in there is no problem the sign_in_time is saved but the problem come when i’m trying to update the sign_out_time
Sona S Vimal 2021-06-20 19:10:40
2021-06-20 17:16:15
Which one do you prefer?

Currently using phpStorm

KellsLTE 2021-06-20 19:21:02
Using the get method with a where condition returns an array. If you want to access the item in the array use this:

$jobs = Jobs::where(‘user_id’, auth()->id())->get()[0]; and you’ll get the object directly

NEXES 2021-06-20 19:21:27
KellsLTE 2021-06-20 19:21:02
Using the get method with a where condition returns an array. If you want to access the item in the array use this:

$jobs = Jobs::where(‘user_id’, auth()->id())->get()[0]; and you’ll get the object directly

Okay

KellsLTE 2021-06-20 19:29:23
KellsLTE 2021-06-20 19:21:02
Using the get method with a where condition returns an array. If you want to access the item in the array use this:

$jobs = Jobs::where(‘user_id’, auth()->id())->get()[0]; and you’ll get the object directly

Also there’s an easier way to do this, just define a relationship between the jobs and user models so you can leverage on the relationship to pull the jobs. The problem with this method I just showed you will give you only one record from the database but if you want all records in the jobs table that holds that user id, you’ll need to use the relationship to make it easier. Your code will look like this:

In your Job model:

public function user()
{
return $this->belongsTo(User::class, ‘user_id’);
}

In your User model:

public function jobs()
{
return $this->hasMany(Job::class);
}

Then you can get all the jobs that that user has like this:

$jobs = auth()->user()->jobs();

This will hold an object containing all the jobs the user has and using a for each loop will give you access to all of them and you can use the object syntax on them

NEXES 2021-06-20 19:35:18
KellsLTE 2021-06-20 19:29:23
Also there’s an easier way to do this, just define a relationship between the jobs and user models so you can leverage on the relationship to pull the jobs. The problem with this method I just showed you will give you only one record from the database but if you want all records in the jobs table that holds that user id, you’ll need to use the relationship to make it easier. Your code will look like this:

In your Job model:

public function user()
{
return $this->belongsTo(User::class, ‘user_id’);
}

In your User model:

public function jobs()
{
return $this->hasMany(Job::class);
}

Then you can get all the jobs that that user has like this:

$jobs = auth()->user()->jobs();

This will hold an object containing all the jobs the user has and using a for each loop will give you access to all of them and you can use the object syntax on them

Okay thanks

KellsLTE 2021-06-20 19:35:35
You’re welcome
natghi2010 2021-06-20 19:40:30
NEXES 2021-06-20 19:35:18
Okay thanks

How many records

Rk Biswa 2021-06-20 20:20:00
I want query like group by item id with where conditions
Rk Biswa 2021-06-20 20:20:11
Like
Rk Biswa 2021-06-20 20:20:59
Product table where condition status =1 group by itemid
Angelafeb 2021-06-20 20:24:14
laravel_discuss-86021.jpg
hi guys can you tell me how to fix this error
Alireza_Abdolmaleki 2021-06-20 20:34:00
Angelafeb 2021-06-20 20:24:14
hi guys can you tell me how to fix this error

Unknown error

Angelafeb 2021-06-20 20:36:45
i know but i dont know how to fix this
Flamingo 2021-06-20 20:40:48
Is this happening in a loop?
Flamingo 2021-06-20 20:42:22
U need to make sure that the array ur accessing is not empty
2021-06-20 21:27:34
Hi, Everyone
I have an interesting business plan.
I have a small development team of 10 members.
We are working on upwork, each one earns more than 3k every month.
Actually more accounts mean more money.
so we need to extend number of accounts now.
This means we need a person who can create upwork account now or has already account.
So who is interested in my team position?
The one who works with my team would take 10% of my income every month, it would be greater than 300$ every month.
If anyone who has question, please contact me.
Please be top first to connect.
savchuk_ivan 2021-06-21 00:12:37
Goodnight. Can anyone tell me. I make an XML parser implement App Console Commands. For testing there is a code $ example = <<< EOF <? Xml version = “1.0”?> … Can anyone tell me which file this xml code can be attached to? Make the code a separate class so that you can call it later?
Rk Biswa 2021-06-21 06:57:16
Iam facing caching issues on laravel project.sometimes I have changed view data but it is not showing on site. How could i solve it.
Jaseel 2021-06-21 07:35:37
Rk Biswa 2021-06-21 06:57:16
Iam facing caching issues on laravel project.sometimes I have changed view data but it is not showing on site. How could i solve it.

Php artisan view:clear

jov2810 2021-06-21 07:36:54
can someone help me deploy mu laravel project? i have 2 laravel project which are backend and frontend. but im struggling to deploy it. i already have my hosting and domain pls i really need help
jov2810 2021-06-21 07:37:04
*my
rebory 2021-06-21 07:42:15
any one little help me who is good in javascript or jquery?
rebory 2021-06-21 07:44:30
laravel_discuss-86038.jpg
i want scroll my menu link left on click
Lalit Rana 2021-06-21 07:46:38
jov2810 2021-06-21 07:36:54
can someone help me deploy mu laravel project? i have 2 laravel project which are backend and frontend. but im struggling to deploy it. i already have my hosting and domain pls i really need help

Which hosting you are using

rebory 2021-06-21 07:47:08
laravel_discuss-86040.jpg
this is html part
rebory 2021-06-21 07:47:47
laravel_discuss-86041.jpg

rebory 2021-06-21 07:52:21
jov2810 2021-06-21 07:36:54
can someone help me deploy mu laravel project? i have 2 laravel project which are backend and frontend. but im struggling to deploy it. i already have my hosting and domain pls i really need help

don’t worry direct message me

Jay_1 2021-06-21 08:22:25
How can i get data from import excel file ????
KellsLTE 2021-06-21 08:25:22
Your code?
kirill_kripa 2021-06-21 08:50:20
Please tell me how to implement “Translatable Models and Multilingual CRUDs” In the Laravel Nova admin panel with Astrotomic/laravel-translatable
saboorhamedi 2021-06-21 09:16:45
can I ask question related to php, about PHPMailer
saboorhamedi 2021-06-21 09:16:58
I keep getting this error: Mailer Error: SMTP connect() failed.
saboorhamedi 2021-06-21 09:17:21
laravel_discuss-86049.jpg
Mailer Error: SMTP connect() failed. Here is the code
|