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