app/Http/Controllers/CarController.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()
    {
        $colors = Color::all();
        $cars = Car::all();
        return view('pages.allCars', compact('colors', 'cars'));
    }
public function index ( ) { $ colors = Color :: all ( ) ; $ cars = Car :: all ( ) ; return view ( 'pages.allCars' , compact ( 'colors' , 'cars' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .