app/Http/Controllers/FieldController.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()
    {
        $countries = Country::all()
            ->groupBy('y')
            ->groupBy('x');
        return view('field.index', compact('countries'));
    }
public function index ( ) { $ countries = Country :: all ( ) -> groupBy ( 'y' ) -> groupBy ( 'x' ) ; return view ( 'field.index' , compact ( 'countries' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .