Esempio n. 1
0
 /**
  * List of all users with pagination
  *
  * @return array
  */
 public function getAllUsers()
 {
     $table = $this->tablesApi->prepare('order', ['first_name', 'last_name', 'email', 'active', 'role_names', 'created_at', 'updated_at', 'edit'], 'UsersController@view');
     $query = $this->getAllUsersQuery($table['sorting']['sortBy'], $table['sorting']['order']);
     $users = $query->paginate(config('testplanner.tables.pagination.lists'));
     $results = ['users' => $users, 'columns' => $table['columns'], 'columnsLink' => $table['columns_link']];
     return $results;
 }
Esempio n. 2
0
 /**
  * Users search functionality
  *
  * @param Request $request
  * @return array|\Illuminate\Contracts\View\Factory|\Illuminate\View\View|mixed
  */
 public function search(Request $request, TablesApi $tablesApi)
 {
     $searchTerms = array_except($request->all(), ['_token', 'admin']);
     $results = $tablesApi->searchUsers($searchTerms);
     return view('pages.main.view_all_users', $results);
 }
 public function displayActivityStream()
 {
     $table = $this->tablesApi->prepare('order', ['activity', 'created_at'], 'ActivityStreamController@index');
     $results = ['activities' => $this->getActivityStream(), 'columns' => $table['columns'], 'columnsLink' => $table['columns_link']];
     return $results;
 }
 /**
  * Activities search functionality
  *
  * @param Request $request
  * @param TablesApi $tablesApi
  * @return array|\Illuminate\Contracts\View\Factory|\Illuminate\View\View|mixed
  */
 public function search(Request $request, TablesApi $tablesApi)
 {
     $searchTerms = array_except($request->all(), ['_token', 'admin']);
     $results = $tablesApi->searchActivities($searchTerms);
     return view('pages.testplanner.view_all_activities', $results);
 }