A
A
Alexey Bolgov2021-02-28 18:27:21
Bootstrap
Alexey Bolgov, 2021-02-28 18:27:21

How to make alert notifications via return?

Good day! tell me how to call alert notification on the page through return and bootstrap? without picking js I was looking for only options through the validator

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton_Kapustin, 2021-03-01
@Alex2412729

return redirect()->route('route')->with('alert', 'Text Alert');
and in blade:

@if(session()->exists('alert'))
    <div class="alert alert-success">
       {{-- само сообщение --}}       
       {{ session('alert') }}
       {{-- кнопка для закрытия алерта --}} 
        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
</div>
@endif

It? Or I didn't understand the question?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question