$article = Article::where('status', 1)
->with('category', 'images', 'profile.user')
->findOrFail($id);
A few things to note here
- your variables should always be lowercase. Save Uppercase for proper class name
- you can load multiple relations with a single with statement
- assuming profile has a user relationship you can load them both at once so you can access in the view like
$article->profile->user->namefor instance
If there is no such relationship;
$article = Article::where('status', 1)
->with('category', 'images', 'profile')
->findOrFail($id);
$user = $article->profile->getuserinfo;
You can then pass both through to the view with compact('article','user')