| 1 | <?php |
||
| 5 | class PlayersController extends \BaseController { |
||
|
|
|||
| 6 | |||
| 7 | public function __construct(PlayerRepo $player) |
||
| 8 | { |
||
| 9 | $this->player = $player; |
||
| 10 | } |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Get Data for all players |
||
| 14 | * |
||
| 15 | * @return Response |
||
| 16 | */ |
||
| 17 | public function index() |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Store a newly created resource in storage. |
||
| 24 | * |
||
| 25 | * @return Response |
||
| 26 | */ |
||
| 27 | public function store() |
||
| 28 | { |
||
| 29 | $this->player->create(Input::get('name'), Input::get('handicap')); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Display the specified resource. |
||
| 34 | * |
||
| 35 | * @param int $id |
||
| 36 | * @return Response |
||
| 37 | */ |
||
| 38 | public function show($id) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Show the form for editing the specified resource. |
||
| 45 | * |
||
| 46 | * @param int $id |
||
| 47 | * @return Response |
||
| 48 | */ |
||
| 49 | public function edit() |
||
| 50 | { |
||
| 51 | |||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Update the specified resource in storage. |
||
| 56 | * |
||
| 57 | * @param int $id |
||
| 58 | * @return Response |
||
| 59 | */ |
||
| 60 | public function update($id) |
||
| 61 | { |
||
| 62 | // |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Remove the specified resource from storage. |
||
| 67 | * |
||
| 68 | * @param int $id |
||
| 69 | * @return Response |
||
| 70 | */ |
||
| 71 | public function destroy($id) |
||
| 75 | |||
| 76 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.