* #9 - set up inertia and tailwind * #9 - fix * #9 - headless ui, heroicons and some webpack stuff * #9 - fix * #9 - fix * #9 - fix * #9 - eslint * #9 - github pr review * #9 - run linter manually * Update resources/js/Pages/Dashboard.vue Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * #9 - fix * Update .eslintrc.js Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com>
This commit is contained in:
21
app/Http/Middleware/HandleInertiaRequests.php
Normal file
21
app/Http/Middleware/HandleInertiaRequests.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Toby\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Inertia\Middleware;
|
||||
|
||||
class HandleInertiaRequests extends Middleware
|
||||
{
|
||||
public function share(Request $request): array
|
||||
{
|
||||
return array_merge(parent::share($request), [
|
||||
"flash" => fn() => [
|
||||
"success" => $request->session()->get("success"),
|
||||
"error" => $request->session()->get("error"),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user