Log model
public function user(){
return $this->belongsTo('User');
}
Retrieve all logs with user details
$logs = Log::with('user')->get();
Display it in view
@foreach ($logs as $log)
{{ $log->user->name }}
@endforeach
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community