app/Http/Controllers/YearListController.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()
    {
        $yearlist = Year::all();
        return view('template',compact('yearlist'));
    }
public function index ( ) { $ yearlist = Year :: all ( ) ; return view ( 'template' , compact ( 'yearlist' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
// return response()->json($yearlist);