⬆️ Met à jour vers Laravel 9

This commit is contained in:
2022-02-24 14:36:06 +01:00
parent e889bb0977
commit 1a41cd3fcb
3 changed files with 1280 additions and 996 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use DateTime;
use http\Env\Response;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
@@ -96,6 +97,9 @@ class PageController extends Controller
throw new FileNotFoundException('Cette page n\'existe pas.');
}
$document = FrontMatter::parse(Storage::disk('pages')->get($file_path));
if (null === $document) {
return response()->json([]); // FIX ME
}
$json = [
'metadata' => $document->getConfig(),
'content' => $document->getContent(),