⬆️ Met à jour vers Laravel 9
This commit is contained in:
parent
e889bb0977
commit
1a41cd3fcb
@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
use http\Env\Response;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
@ -96,6 +97,9 @@ class PageController extends Controller
|
|||||||
throw new FileNotFoundException('Cette page n\'existe pas.');
|
throw new FileNotFoundException('Cette page n\'existe pas.');
|
||||||
}
|
}
|
||||||
$document = FrontMatter::parse(Storage::disk('pages')->get($file_path));
|
$document = FrontMatter::parse(Storage::disk('pages')->get($file_path));
|
||||||
|
if (null === $document) {
|
||||||
|
return response()->json([]); // FIX ME
|
||||||
|
}
|
||||||
$json = [
|
$json = [
|
||||||
'metadata' => $document->getConfig(),
|
'metadata' => $document->getConfig(),
|
||||||
'content' => $document->getContent(),
|
'content' => $document->getContent(),
|
||||||
|
@ -9,18 +9,18 @@
|
|||||||
"fruitcake/laravel-cors": "^2.0",
|
"fruitcake/laravel-cors": "^2.0",
|
||||||
"guzzlehttp/guzzle": "^7.0.1",
|
"guzzlehttp/guzzle": "^7.0.1",
|
||||||
"kzykhys/yaml-front-matter": "^1.0",
|
"kzykhys/yaml-front-matter": "^1.0",
|
||||||
"laravel/framework": "^8.75",
|
"laravel/framework": "^9.0",
|
||||||
"laravel/sanctum": "^2.11",
|
"laravel/sanctum": "^2.11",
|
||||||
"laravel/tinker": "^2.5",
|
"laravel/tinker": "^2.5",
|
||||||
"laravel/ui": "^3.4"
|
"laravel/ui": "^3.4"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"facade/ignition": "^2.5",
|
"spatie/laravel-ignition": "^1.0",
|
||||||
"fakerphp/faker": "^1.9.1",
|
"fakerphp/faker": "^1.9.1",
|
||||||
"laravel/breeze": "^1.7",
|
"laravel/breeze": "^1.7",
|
||||||
"laravel/sail": "^1.0.1",
|
"laravel/sail": "^1.0.1",
|
||||||
"mockery/mockery": "^1.4.4",
|
"mockery/mockery": "^1.4.4",
|
||||||
"nunomaduro/collision": "^5.10",
|
"nunomaduro/collision": "^6.1",
|
||||||
"phpunit/phpunit": "^9.5.10"
|
"phpunit/phpunit": "^9.5.10"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
2266
composer.lock
generated
2266
composer.lock
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user