app/Http/Controllers/SubjectController.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()
    {
        $subjects = Subject::all();
        $total_subjects = $subjects->count();
        return view('subjects.show', [
            'subjects' => $subjects, 
            'total_subjects' => $total_subjects
        ]);
    }
public function index ( ) { $ subjects = Subject :: all ( ) ; $ total_subjects = $ subjects -> count ( ) ; return view ( 'subjects.show' , [ 'subjects' => $ subjects , 'total_subjects' => $ total_subjects ] ) ; }
Display a listing of the resource.
Display a listing of the resource .