|
@ -61,6 +61,8 @@ class TeamController extends Controller |
|
|
|
|
|
|
|
|
public function create_team() |
|
|
public function create_team() |
|
|
{ |
|
|
{ |
|
|
|
|
|
$this->authorize('admin'); |
|
|
|
|
|
|
|
|
// Get list of current used colors
|
|
|
// Get list of current used colors
|
|
|
$teams = DB::table('teams')->pluck('name')->toArray(); |
|
|
$teams = DB::table('teams')->pluck('name')->toArray(); |
|
|
$color_names = array_values(self::colors()); |
|
|
$color_names = array_values(self::colors()); |
|
@ -84,6 +86,8 @@ class TeamController extends Controller |
|
|
|
|
|
|
|
|
public function add_player(Request $request) |
|
|
public function add_player(Request $request) |
|
|
{ |
|
|
{ |
|
|
|
|
|
$this->authorize('admin'); |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
// Look up the user ID
|
|
|
// Look up the user ID
|
|
|
$profile = Twitter::getUsers(['screen_name' => trim($request->input('twitter'), '@')]); |
|
|
$profile = Twitter::getUsers(['screen_name' => trim($request->input('twitter'), '@')]); |
|
@ -107,9 +111,4 @@ class TeamController extends Controller |
|
|
return response()->json(['error'=>$e->getMessage()]); |
|
|
return response()->json(['error'=>$e->getMessage()]); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function remove_player() |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |