Answers for "laravel if has relation"

PHP
0

how get data if has relation in laravel

Doctor::has('DoctorMessage')->with('DoctorMessage')->get()
Posted by: Guest on August-28-2021
0

laravel check if model has relation

use AppModelsPost;
 
// Retrieve all posts that have at least one comment...
$posts = Post::has('comments')->get();
Posted by: Guest on February-22-2022

Browse Popular Code Answers by Language