← prev | next →
FaKe_Sahandi81 2022-07-28 16:38:32
just explain the database structure. i can coding but i want to it it in best performance
zey34354 2022-07-28 16:46:32
Web Developer 2022-07-28 16:09:39
Home.profile…..
where should I write it do you mean ?
CyberPanther 2022-07-28 16:47:33
How can i access the attribute of model , i know how to set but don’t know how to access
Web Developer 2022-07-28 16:47:45
zey34354 2022-07-27 21:26:14
anyone can help me
Here
Web Developer 2022-07-28 16:47:55
In @livewire()
FaKe_Sahandi81 2022-07-28 16:56:47
CyberPanther 2022-07-28 16:47:33
How can i access the attribute of model , i know how to set but don’t know how to access
public $attribute
…
$model->attribute
CyberPanther 2022-07-28 18:01:00
FaKe_Sahandi81 2022-07-28 16:56:47
public $attribute
…
$model->attribute
Thank you sir , can i check it with a if condition.
CyberPanther 2022-07-28 18:13:39
Is this right?
$test= $model->attribute;
If($test)
{
Echo “yes”;
}else{
Echo “no”;
}
DesolatorMagno 2022-07-28 18:24:22
echo $model->attribute ? ‘yes’ : ‘no’
salsafh 2022-07-28 19:17:52
Hello there! Please, how can I validate date of birth to be younger than 18 years for male gender and any years for females. Thanks
DesolatorMagno 2022-07-28 20:03:17
show what you tried, or at least your request file.
TheRajChotaliya 2022-07-28 20:17:57
Hello everyone
can anyone please guide me how to set execution time for cron job on server
I want to terminate all process after 10 minute
Стефан 2022-07-28 20:20:39
salsafh 2022-07-28 19:17:52
Hello there! Please, how can I validate date of birth to be younger than 18 years for male gender and any years for females. Thanks
You can create a custom validation class and to the logic in boot
Laradev 2022-07-28 20:40:47
salsafh 2022-07-28 19:17:52
Hello there! Please, how can I validate date of birth to be younger than 18 years for male gender and any years for females. Thanks
$dt = new CarbonCarbon();
$before = $dt->subYears(18)->format(‘Y-m-d’);
$rules = [
…
‘dob’ => ‘required|date|before:’ . $before
];
Maybe this can help in validating the dates, but as per your question, you need to initialize gender first in your controller, check if Auth::user()->gender is female then write your date validation logic, elseif check if user is male, write your date validation logic
etekumoses 2022-07-28 20:46:25
Can I do a search query in two tables at the same time ?
Web Developer 2022-07-28 20:48:52
etekumoses 2022-07-28 20:46:25
Can I do a search query in two tables at the same time ?
Yes
Laradev 2022-07-28 20:48:54
etekumoses 2022-07-28 20:46:25
Can I do a search query in two tables at the same time ?
Yes using the ‘wherehas’
Web Developer 2022-07-28 20:49:39
Or you can do join as well
etekumoses 2022-07-28 20:50:11
I have a table of appointments but with user id so my query as of now has only appointment ID but i what to search based on user name
Laradev 2022-07-28 20:55:14
etekumoses 2022-07-28 20:50:11
I have a table of appointments but with user id so my query as of now has only appointment ID but i what to search based on user name
On such issue, make sure you have set your relationship well, and if I can relate well you need to do eager loading, whereby you will use ‘with’
Example, User:: with ([‘appointments’])->where(‘username’, Auth::user()->username)->get()
Web Developer 2022-07-28 20:57:10
Laradev 2022-07-28 20:55:14
On such issue, make sure you have set your relationship well, and if I can relate well you need to do eager loading, whereby you will use ‘with’
Example, User:: with ([‘appointments’])->where(‘username’, Auth::user()->username)->get()
Yess right
zey34354 2022-07-28 21:11:04
Web Developer 2022-07-28 16:47:55
In @livewire()
I showed you it in the photos in above
ailiya678 2022-07-28 21:11:28
Finish my goal today, do it again tomorrow
TheRajChotaliya 2022-07-28 21:11:56
TheRajChotaliya 2022-07-28 20:17:57
Hello everyone
can anyone please guide me how to set execution time for cron job on server
I want to terminate all process after 10 minute
Anyone have idea about it ?
salsafh 2022-07-28 21:55:41
Laradev 2022-07-28 20:40:47
$dt = new CarbonCarbon();
$before = $dt->subYears(18)->format(‘Y-m-d’);
$rules = [
…
‘dob’ => ‘required|date|before:’ . $before
];
Maybe this can help in validating the dates, but as per your question, you need to initialize gender first in your controller, check if Auth::user()->gender is female then write your date validation logic, elseif check if user is male, write your date validation logic
Thank you so much, will try it
Dhruv Trivedi 2022-07-28 22:06:04
Hello I want integration theme vuexy how integration theme? Help me
eken_franky 2022-07-28 22:40:57
good evening i need help with google drive api integration on laravel 8
etekumoses 2022-07-28 23:39:46
Laradev 2022-07-28 20:55:14
On such issue, make sure you have set your relationship well, and if I can relate well you need to do eager loading, whereby you will use ‘with’
Example, User:: with ([‘appointments’])->where(‘username’, Auth::user()->username)->get()
This is clear
etekumoses 2022-07-28 23:41:53
Imagine had this format for my query and someone has typed a username how do I ensure I query it too …
Appointment:: with ([‘users’])->where(‘app_id’,…….)->get()
Laradev 2022-07-28 23:49:33
Appointment::wherehas(‘users’, function ($query){ $query->where(‘username’, Auth::user()->username)}->get();
I your relationship specify app_is as foreign key
etekumoses 2022-07-29 00:01:31
Laradev 2022-07-28 23:49:33
Appointment::wherehas(‘users’, function ($query){ $query->where(‘username’, Auth::user()->username)}->get();
I your relationship specify app_is as foreign key
My appointment table has userID should leave it out and consider this
Laradev 2022-07-29 00:02:28
etekumoses 2022-07-29 00:01:31
My appointment table has userID should leave it out and consider this
No that’s fine
Laradev 2022-07-29 00:02:49
Use it as foreign-key,
etekumoses 2022-07-29 00:08:28
etekumoses 2022-07-29 00:09:10
This is what have what should I change the user Id should be the name not by ID
etekumoses 2022-07-29 00:09:57
Kindly help me correct this the other appointment ID works the other part should now be when a user types the name I search in the users table
Laradev 2022-07-29 00:12:29
You’re missing the get() at the end of your queries
etekumoses 2022-07-29 00:13:48
But but works
etekumoses 2022-07-29 00:14:04
Only that the search for username is what I want
Laradev 2022-07-29 00:15:48
etekumoses 2022-07-29 00:13:48
But but works
Does the other query work? Only username doesn’t?
etekumoses 2022-07-29 00:16:03
Laradev 2022-07-29 00:15:48
Does the other query work? Only username doesn’t?
Yes
etekumoses 2022-07-29 00:17:00
Laradev 2022-07-28 23:49:33
Appointment::wherehas(‘users’, function ($query){ $query->where(‘username’, Auth::user()->username)}->get();
I your relationship specify app_is as foreign key
This function does it work
Laradev 2022-07-29 00:17:25
Can I see the whole code from top
Laradev 2022-07-29 00:18:04
etekumoses 2022-07-29 00:17:00
This function does it work
Yes it does
eken_franky 2022-07-29 00:57:02
good evening, I need help with the google drive api on laravel, I have already integrated Google into the project, but during the tests I suddenly got an error, which told me ( we’re sorry, but your computer or network may be sending automated queries) after closing the browser and restarting the site everything is back to how it was before, but I would like to know the source of this error and how to fix it?
ForgeDark 2022-07-29 01:06:46
Any one with icloud logs or gmx.net logs for sales Vs Btc ?
segungreat 2022-07-29 01:20:15
marichka_ry 2022-07-27 13:30:05
yes
Ok am interested
Laksida 2022-07-29 04:46:35
can some body help me i have a error when i create and user as admin
🧣🧣🧣 🌾🌾🌾 2022-07-29 04:47:23
Share the error and let’s see
🧣🧣🧣 🌾🌾🌾 2022-07-29 04:47:34
I mean a picture or what the error says
← prev | next →