xmrmemes/app/Http/Controllers/ApiController.php
dev 821fb9b1ed Finish rough draft of website
Update the payment code so everything is working now

Improve DB structure

Improve design

Add API

Validate XMR Address upon registration

And Much More...

Still Need to work on:

- SEO
- Dropdown in menu (bug, not dropping down)
2021-08-06 13:06:07 -07:00

26 lines
489 B
PHP

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Meme;
class ApiController extends Controller
{
public function documentation()
{
$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;
}
}