app/Http/Controllers/Admin/ExerciseController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $exercises = Exercise::with('partOfBody')->orderBy('exercise_name')->paginate(20);
        return view('admin.exercises.index', [
            'exercises' => $exercises
        ]);
    }
public function index ( ) { $ exercises = Exercise :: with ( 'partOfBody' ) -> orderBy ( 'exercise_name' ) -> paginate ( 20 ) ; return view ( 'admin.exercises.index' , [ 'exercises' => $ exercises ] ) ; }
Display a listing of the resource.
Display a listing of the resource .