Skip to content

Latest commit

 

History

History
4 lines (4 loc) · 463 Bytes

README.md

File metadata and controls

4 lines (4 loc) · 463 Bytes
laravel-code SQL- QUERIES
One-to-One
hasOne(UserWallet::class)
$user->wallet()
select * from user_wallets
where user_wallets.user_id = ?
and user_wallets.user_id is not null
One-to-Many
hasMany(Notification::class)
$user->notifications()
select * from notifications
where notifications.user_id = ?
and notifications.user_id is not null