app/Http/Controllers/Student/MyProfileController.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()
    {
        $myuser = Auth::User();
        $states = State::all();
        $countries = Country::all();
        $grades = Grade::with('subjects')->get();
        $grades_array = $grades->toArray();
        return view('students.myprofile.index', compact('grades', 'states', 'countries', 'grades_array', 'myuser'));
    }
public function index ( ) { $ myuser = Auth :: User ( ) ; $ states = State :: all ( ) ; $ countries = Country :: all ( ) ; $ grades = Grade :: with ( 'subjects' ) -> get ( ) ; $ grades_array = $ grades -> toArray ( ) ; return view ( 'students.myprofile.index' , compact ( 'grades' , 'states' , 'countries' , 'grades_array' , 'myuser' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .