add types
This commit is contained in:
@@ -8,6 +8,7 @@ use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\View\View;
|
||||
use Laravel\Nova\Nova;
|
||||
|
||||
class LoginController extends Controller
|
||||
@@ -37,8 +38,6 @@ class LoginController extends Controller
|
||||
|
||||
/**
|
||||
* Show the application's login form.
|
||||
*
|
||||
* @return \Inertia\Response|\Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function showLoginForm()
|
||||
{
|
||||
@@ -81,9 +80,9 @@ class LoginController extends Controller
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function redirectPath()
|
||||
public function redirectPath(): string
|
||||
{
|
||||
return Nova::url(Nova::$initialPath);
|
||||
return Nova::url(is_callable(Nova::$initialPath) ? call_user_func(Nova::$initialPath) : Nova::$initialPath);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
||||
class LocaleController extends Controller
|
||||
{
|
||||
/**
|
||||
* @return RedirectResponse
|
||||
*/
|
||||
public function __invoke($locale)
|
||||
public function __invoke(string $locale): RedirectResponse
|
||||
{
|
||||
if (array_key_exists($locale, config('app.locales'))) {
|
||||
session()->put('locale', $locale);
|
||||
|
||||
Reference in New Issue
Block a user