public function compose(View $view) { $documentForm = \Request::only('responsable_id'); $route = Route::currentRouteName(); $users = User::orderBy('name', 'ASC')->lists('name', 'id')->toArray(); $view->with(compact('documentForm', 'users', 'route')); }
/** * @param Request $request * @return \BladeView|bool|\Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function index(Request $request) { //dd($request->get('search_user')); $users = User::orderBy('id', 'desc')->paginate(5); return view('admin.users.index', compact('users')); }