Add success message when payment created
This commit is contained in:
parent
14a478785e
commit
753c115b34
|
@ -21,6 +21,7 @@ class InertiaShareMiddleware
|
|||
\Inertia::share([
|
||||
'auth' => ['user' => auth()->check() ? new UserResource(auth()->user()) : null],
|
||||
'search' => $request->query('search', ''),
|
||||
'flash' => session()->get('flash'),
|
||||
'menu' => function() {
|
||||
return session()->get('menu');
|
||||
},
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
namespace App\Payment;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Member\Member;
|
||||
use App\Payment\Status;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AllpaymentController extends Controller
|
||||
{
|
||||
|
@ -30,6 +30,6 @@ class AllpaymentController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
return redirect()->back()->success('Zahlungen erstellt');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -17,6 +18,13 @@ class AppServiceProvider extends ServiceProvider
|
|||
JsonResource::withoutWrapping();
|
||||
|
||||
\Inertia::share('search', request()->query('search', ''));
|
||||
|
||||
RedirectResponse::macro('success', function($flash) {
|
||||
session()->flash('flash', ['success' => $flash]);
|
||||
|
||||
return $this;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div id="app" class="flex font-sans flex-grow">
|
||||
|
||||
<notification class="fixed z-40 right-0 top-0 mt-3 mr-3"></notification>
|
||||
<notification class="fixed z-40 right-0 bottom-0 mb-3 mr-3"></notification>
|
||||
|
||||
<!-- ******************************** Sidebar ******************************** -->
|
||||
<div class="fixed bg-gray-800 p-6 w-56 left-0 top-0 h-screen border-r border-gray-600 border-solid">
|
||||
|
|
|
@ -46,6 +46,7 @@ module.exports = {
|
|||
},
|
||||
green: {
|
||||
100: colors.green[100],
|
||||
300: colors.green[300],
|
||||
800: colors.green[800],
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue