mirror of
https://repo.getmonero.org/AnonDev/xmrmemes.git
synced 2024-12-22 14:15:08 -05:00
28 lines
564 B
PHP
28 lines
564 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Models\Meme;
|
|
use Artesaos\SEOTools\Facades\SEOTools;
|
|
|
|
class ApiController extends Controller
|
|
{
|
|
public function documentation()
|
|
{
|
|
SEOTools::setTitle('API');
|
|
$data = [
|
|
'memes_example' => json_encode(Meme::limit(1)->get(), JSON_PRETTY_PRINT),
|
|
'memes_endpoint' => url('api/memes'),
|
|
];
|
|
return view('api', ['data' => $data]);
|
|
}
|
|
|
|
public function memes()
|
|
{
|
|
$memes = Meme::get();
|
|
return $memes;
|
|
}
|
|
|
|
}
|