adrema/app/Initialize/InitializeController.php

24 lines
466 B
PHP
Raw Normal View History

2020-04-12 00:26:44 +02:00
<?php
namespace App\Initialize;
use App\Http\Controllers\Controller;
2022-02-12 15:00:30 +01:00
use Illuminate\Http\RedirectResponse;
2021-11-20 01:43:20 +01:00
use Illuminate\Http\Request;
2022-02-12 15:00:30 +01:00
use Inertia\Response;
2020-04-12 00:26:44 +02:00
class InitializeController extends Controller
{
2022-02-12 15:00:30 +01:00
public function index(): Response
{
return \Inertia::render('Initialize/VIndex');
2020-04-12 00:26:44 +02:00
}
2022-02-12 15:00:30 +01:00
public function store(): RedirectResponse
{
2020-04-12 00:26:44 +02:00
InitializeJob::dispatch(auth()->user());
2021-11-20 01:43:20 +01:00
return redirect()->route('home');
2020-04-12 00:26:44 +02:00
}
}