Debug add systempay sync button
This commit is contained in:
parent
5af3ffa261
commit
99a8a0da47
3 changed files with 16 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ return [
|
|||
* * Note that this can take route names or route urls (both partially)
|
||||
*/
|
||||
'ignoreRoutes' => [
|
||||
'commands.',
|
||||
'cashier.',
|
||||
'bo.',
|
||||
'login.',
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@
|
|||
<ul class="navbar-nav ms-auto">
|
||||
<!-- Authentication Links -->
|
||||
@auth('backend')
|
||||
<li class="nav-item">
|
||||
<a class="btn btn-warning" href="{{ route('bo.commands.systempay.update_credit_transactions') }}">
|
||||
<span class="fw-bold">{{ __('DEBUG: Màj Systempay') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span class="nav-link fw-bold {{ auth('backend')->user()->role->equals(\App\Enums\UserRole::admin()) ? 'text-primary' : 'text-success'}}">{{
|
||||
auth('backend')->user()->role->label
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use App\Http\Controllers\Bo\StaticPageController;
|
|||
use App\Http\Controllers\Bo\TagController;
|
||||
use App\Http\Controllers\Bo\RangeController;
|
||||
use App\Http\Controllers\Bo\XmlIncoController;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
Route::prefix('bo')->name('bo.')->group(function () {
|
||||
|
|
@ -36,6 +37,15 @@ Route::prefix('bo')->name('bo.')->group(function () {
|
|||
Route::middleware('auth:backend')->group(function () {
|
||||
Route::get('/', [DashboardController::class, 'index'])->name('dashboard');
|
||||
|
||||
Route::get('/commands/systempay/update_credit_transactions', function () {
|
||||
if (!config('app.debug')) {
|
||||
abort(400);
|
||||
}
|
||||
Artisan::call('systempay:update_credit_transactions');
|
||||
session()->flash('info', trans('La commande à été lancée'));
|
||||
return back();
|
||||
})->name('commands.systempay.update_credit_transactions');
|
||||
|
||||
// * RESOURCES
|
||||
// * StaticPages
|
||||
Route::resource('static_pages', StaticPageController::class)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue