public function getIndex(Request $request, $userId)
    {
        $user = User::findOrFail($userId);

        $items = $user->items()
            ->where('start_date', '<=', time())
            ->where('end_date', '>=', time())
            ->orderBy('end_date', 'asc')
            ->paginate();

        return view('mustard::user.profile', [
            'user'      => $user,
            'items'     => $items,
            'feedbacks' => mustard_loaded('feedback')
                ? $user->feedbackReceived()->orderBy('placed')->take(3)->get()
                : new Collection(),
        ]);
    }
public function getIndex(Request $request, $userId)
    {
        $user = User::findOrFail($userId);

        $items = $user->items()
            ->where('start_date', '<=', time())
            ->where('end_date', '>=', time())
            ->orderBy('end_date', 'asc')
            ->paginate();

        return view('mustard::user.profile', [
            'user'      => $user,
            'items'     => $items,
            'feedbacks' => mustard_loaded('feedback')
                ? $user->feedbackReceived()->orderBy('placed')->take(3)->get()
                : new Collection(),
        ]);
    }
public function getIndex ( Request $ request , $ userId ) { $ user = User :: findOrFail ( $ userId ) ; $ items = $ user -> items ( ) -> where ( 'start_date' , '<=' , time ( ) ) -> where ( 'end_date' , '>=' , time ( ) ) -> orderBy ( 'end_date' , 'asc' ) -> paginate ( ) ; return view ( 'mustard::user.profile' , [ 'user' => $ user , 'items' => $ items , 'feedbacks' => mustard_loaded ( 'feedback' ) ? $ user -> feedbackReceived ( ) -> orderBy ( 'placed' ) -> take ( 3 ) -> get ( ) : new Collection ( ) , ] ) ; }
Return the user profile view.

@return \Illuminate\View\View
Return the user profile view .