mirror of
https://github.com/kevin-DL/commander_league_api.git
synced 2026-01-11 18:44:32 +00:00
- Created the formats tables/migrations - Created the controller to retrieve the formats
20 lines
318 B
PHP
20 lines
318 B
PHP
<?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);
|
|
}
|
|
}
|