mirror of
https://github.com/kevin-DL/commander_league_api.git
synced 2026-01-11 18:44:32 +00:00
Game formats
- Created the formats tables/migrations - Created the controller to retrieve the formats
This commit is contained in:
19
app/Http/Controllers/FormatsController.php
Normal file
19
app/Http/Controllers/FormatsController.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
|
||||
use App\Model\Format;
|
||||
|
||||
class FormatsController extends Controller
|
||||
{
|
||||
/**
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$formats = Format::all();
|
||||
return response()->json(['data' => $formats->toArray()], 200);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user