I would like to use SweetAlert to display my data.
I did my function
public function registration()
{
Gate::authorize('admin-level');
$url = URL::signedRoute(
'register',
now()->addMinutes(20));
return redirect('users')->with('success','$url');
}
and route that goes with it
Route::get('registration', [App\Http\Controllers\UserController::class, 'registration'])->name('registration');
The problem is with message, since I downloaded SweetAlert with composer I should probably got everything working, but then when I try to execute my class with button threw the route:
<a href="{{route('registration')}}"><button type="button" class="btn btn-outline-primary">{{ __('Registration link') }}</button></a>
@if(session('succes_message'))
<div class= "alert alert-succes">
{{session('succes_message')}}
</div>
@endif
Nothing pops up(when it should)
What might be wrong with it?