add typeahead support for owner email when adding new server

closes #144
pic: http://s3.pterodactyl.io/UpPSJ.png
This commit is contained in:
Dane Everitt 2016-10-21 15:22:47 -04:00
parent f9f751b7f2
commit bef717b202
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 55 additions and 0 deletions

View file

@ -130,4 +130,12 @@ class UserController extends Controller
return redirect()->route('admin.users.view', $user);
}
public function getJson(Request $request)
{
foreach(User::select('email')->get() as $user) {
$resp[] = $user->email;
}
return $resp;
}
}

View file

@ -73,6 +73,11 @@ class AdminRoutes {
'uses' => 'Admin\UserController@getIndex'
]);
$router->get('/accounts.json', [
'as' => 'admin.users.json',
'uses' => 'Admin\UserController@getJson'
]);
// View Specific Account
$router->get('/view/{id}', [
'as' => 'admin.users.view',