1

i use toastr by Brian2694\Toastr\ToastrServiceProvider::class in my laravel project but now i have a problem is not working after redirect example when i update things i set toastr to show me the success message but is not working only work when i return view not route

toastr()->success('successfuly updated', 'Notification');
redirect()->route('account.financials.collections.portifolios.buildings.show', $results)



but in my layout i have
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css"
        integrity="sha512-vKMx8UnXk60zUwyUnUPM3HbQo8QfmNx7+ltw8Pm5zLusl1XIfwcxo8DbWCqMGKaWeNxWA8yrx5v3SaVpMvR3CA=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>


<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"
        integrity="sha512-VEd+nq25CkR676O+pLBnDW09R7VQX9Mdiij052gVCp5yVH3jGtH70Ho/UUv4mJDsEdTvqRCFZg0NKGiojGnUCw=="
        crossorigin="anonymous" referrerpolicy="no-referrer"></script>

{!! toastr()->message() !!}
    {!! toastr()->clear() !!}


i included the Provider in app.config
'providers' => [
        Brian2694\Toastr\ToastrServiceProvider::class,
]
1
  • please help am still not getting solution Commented Jun 11 at 2:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.