| 1 | <?php |
||
| 5 | class RoundsController extends \BaseController { |
||
|
|
|||
| 6 | |||
| 7 | public function __construct(RoundRepo $roundRepo) |
||
| 8 | { |
||
| 9 | $this->roundRepo = $roundRepo; |
||
| 10 | } |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Get Data for all rounds |
||
| 14 | * |
||
| 15 | * @return Response |
||
| 16 | */ |
||
| 17 | public function index() |
||
| 18 | { |
||
| 19 | return $this->roundRepo->all(); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Show the form for creating a new resource. |
||
| 24 | * |
||
| 25 | * @return Response |
||
| 26 | */ |
||
| 27 | public function create() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Store a newly created resource in storage. |
||
| 34 | * |
||
| 35 | * @return Response |
||
| 36 | */ |
||
| 37 | public function store() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Display the specified resource. |
||
| 44 | * |
||
| 45 | * @param int $id |
||
| 46 | * @return Response |
||
| 47 | */ |
||
| 48 | public function show($id) |
||
| 49 | { |
||
| 50 | $results = $this->roundRepo->findByPlayer($id); |
||
| 51 | $data['data'] = $results; |
||
| 52 | return $data; |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Show the form for editing the specified resource. |
||
| 57 | * |
||
| 58 | * @param int $id |
||
| 59 | * @return Response |
||
| 60 | */ |
||
| 61 | public function edit($id) |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Update the specified resource in storage. |
||
| 68 | * |
||
| 69 | * @param int $id |
||
| 70 | * @return Response |
||
| 71 | */ |
||
| 72 | public function update($id) |
||
| 76 | |||
| 77 | /** |
||
| 78 | * Remove the specified resource from storage. |
||
| 79 | * |
||
| 80 | * @param int $id |
||
| 81 | * @return Response |
||
| 82 | */ |
||
| 83 | public function destroy($id) |
||
| 87 | |||
| 88 | } |
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.