Snapshot of main at 9f39a6e1e (2026-11-02)
This commit is contained in:
commit
6ccf1792d7
2580 files changed
+1040202
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Responses;
|
||||
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Laravel\Fortify\Contracts\PasswordResetResponse as PasswordResetResponseContract;
|
||||
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
|
||||
class PasswordResetResponse implements PasswordResetResponseContract
|
||||
{
|
||||
protected $status;
|
||||
|
||||
public function __construct(string $status)
|
||||
{
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
public function toResponse($request)
|
||||
{
|
||||
if ($request->wantsJson()) {
|
||||
return new JsonResponse(['message' => trans($this->status)], 200);
|
||||
}
|
||||
|
||||
$mainUrl = LaravelLocalization::localizeURL(route('main'));
|
||||
|
||||
return redirect($mainUrl)->with('notification', true)
|
||||
->with('notification.success', __('passwords.reset'));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user