yoeunes / toastr Goto Github PK
View Code? Open in Web Editor NEW:eyes: toastr.js notifications for Laravel
Home Page: https://php-flasher.io
License: MIT License
:eyes: toastr.js notifications for Laravel
Home Page: https://php-flasher.io
License: MIT License
Hi, there is any way to render the toastr without refresh or redirect the user? This would be nice for using with ajax requests.
First, THANK YOU for the hard work of making this happen. It makes it much easier than having to reinvent the wheel when it comes to my projects. ๐ฅ
When I used the method of publishing the config file that you specified in the readme, it does not publish to the config directory in Laravel.
As optional if you want to modify the default configuration, you can publish the configuration file:
$ php artisan vendor:publish --provider='Yoeunes\Toastr\ToastrServiceProvider' --tag="config"
I worked around the issue by modifying the config file that is in the src package, but I do not like doing that.
Thanks again!
Describe the bug
Toastris opens again when I return to the same URL in Laravel
How can I destroy or clear it once it's done?
To Reproduce
Desktop (please complete the following information):
Severity
php artisan vendor:publish --provider='Yoeunes\Toastr\ToastrServiceProvider' --tag="config"
This command doesn't work for laravel 5.6.
Describe the bug
The bug consists of duplicating the page's jQuery if it already has an imported jQuery script, after toastr's popup returns.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It is expected that jQuery will stop working due to duplicate imports.
Desktop (please complete the following information):
Additional context
Describe the bug
The Toast only is showed on next refresh
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The toast should show on click button
Desktop (please complete the following information):
Severity
Additional context
Hello,
I am using toastr and it's a great package.
Actually, I have a question.
toastr message shows up again when I try to go back on view page.
Here's some part of my code.
// controller
toastr()->success('complete. \\n'.$return, '', ['timeOut' => 5000, 'positionClass' => 'toast-center-center']);
return redirect()->back();
// blade
@if (Session::has('success'))
<div class="row justify-content-end">
<div class="col-3 col-align-self-end alert alert-success alert-block">
<button type="button" class="close" data-dismiss="alert">ร</button>
<strong>
toastr.success("{{ $message }}");
</strong>
</div>
</div>
@endif
....
<!-- container-fluid end -->
@toastr_css
@toastr_js
@toastr_render
Did I do something wrong here? Or could you tell me where should I check for?
Describe the bug
A clear and concise description of what the bug is.
package's jquery cdn often clashes with preloaded project's jquery and causes other libraries to malfunction.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
It should run smoothly as it was without the toast
Screenshots
If applicable, add screenshots to help explain your problem.
Error occur with the toastr
After commenting this cdn it is working as it should.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The default CSS class 'toast', used by default, gets overridden for the same class used by Bootstrap. So, Bootstrap adds extra styles that breaks Toastr boxes.
I was able to solve it adding a config/toastr.php
file and using another class, like: 'toastClass' => 'toastr'
Just installing Bootstrap and Toastr, and firing any msg
i added toastr to my laravel project , it is work but without bg color , how can fix this issue?
thanks
https://prnt.sc/BD6_rURJ8OML
When using in a method like Store or Update, the toast never pops up
When used in the index method it does pop up... So it's setup correctly, it's just not working after a redirect
As described in #13, publishing the config file currently fails with the error message "Unable to locate publishable resources".
Try to publish the config file
Describe the bug
In our application, we often assert if the correct view is returned like so:
$response = $this->get(route('index'));
$response->assertOk()
->assertViewIs('dashboard.index');
This works with Laravel 9 and your yoeunes/toastr v1, but since upgrading to Laravel 10 and yoeunes/toastr v2 all tests that use assertViewIs
now return the following error: The response is not a view.
I think this may be caused by adding the CDN link to flasher in every view.
Sidenote The pages that "don't return a view" do still work as intended.
To Reproduce
Steps to reproduce the behaviour:
composer create-project laravel/laravel 'project-name'
)tests/Feature/Exampletext
: replace ->assertStatus(200)
with ->assertOk()->assertViewIs('welcome')
.composer require yoeunes/toastr
)Expected behavior
What should otherwise be valid views in Laravel, should not suddenly become invalid, or no views.
Desktop (please complete the following information):
FROM php:8-apache
). This problem also occurs when running it in macOS 14.2.1 (23C71)Severity
Describe the bug
vscode display error
Undefined Function 'App\Http\Controllers\toastr'
but it works in browser. (just showing unnecessary error in vscode)
i don't know if this is bug or not. but maybe any suggestion to get rid off this error?
To Reproduce
Steps to reproduce the behavior:
toastr()
function in any controllersExpected behavior
there is no error in vscode terminal
Desktop (please complete the following information):
Additional context
Class 'Yoeunes\Toastr\ToastrServiceProvider' not found
Yoeunes\Toastr installed by composer in local and migrated by ftp to new server
Class added to providers
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Severity
Related Issues
Additional context
I can't get render blade directives in many causes. In docs i can see: Blade directive need to be registered in boot method. I can resolve my trouble whit this.
Toastr Is unable to install in laravel 7
Kindly test it make installabale
Where is the toast.clear() function located?
the toast not working on AJAX CRUD but it work if i refresh the page
Hello!
At first place, I want to thank you for this project! It's great.
I have an issue using it in my app, because I need the option to set the maximum number of displayed toasts to 1, or option to clear previous toasts before the last toastr('') in the controller.
Are there such options available?
Thank you in advance!
i try a lot of things con css like background display iomage none,
on toastr confit
show icon false,
try to fill the icon with color black...
but nothing works
I am using Laravel 11 and I'm currently faced this issue when Installing toastr.
Here's the Error. Could fix the error as soon as Possible.
Symfony\Component\ErrorHandler\Error\FatalError
Declaration of Flasher\Laravel\Command\InstallCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int
at vendor\php-flasher\flasher-laravel\Command\InstallCommand.php:35
PHP Fatal error: Declaration of Flasher\Laravel\Command\InstallCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in C:\Users\Makuguren\Documents\CAPSTONE PROJECT\PiLock-Admin-Laravel-10-2\vendor\php-flasher\flasher-laravel\Command\InstallCommand.php on line 35
31โ
32โ /**
33โ * @return int
34โ */
โ 35โ protected function execute(InputInterface $input, OutputInterface $output)
36โ {
37โ $output->writeln('');
38โ $output->writeln('
39โ โโโโโโโ โโโ โโโโโโโโโโ โโโโโโโโโโโ โโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ
Whoops\Exception\ErrorException
Declaration of Flasher\Laravel\Command\InstallCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int
at vendor\php-flasher\flasher-laravel\Command\InstallCommand.php:35
31โ
32โ /**
33โ * @return int
34โ */
โ 35โ protected function execute(InputInterface $input, OutputInterface $output)
36โ {
37โ $output->writeln('');
38โ $output->writeln('
39โ โโโโโโโ โโโ โโโโโโโโโโ โโโโโโโโโโโ โโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ
1 vendor\filp\whoops\src\Whoops\Run.php:510
Whoops\Run::handleError("Declaration of Flasher\Laravel\Command\InstallCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int", "C:\Users\Makuguren\Documents\CAPSTONE PROJECT\PiLock-Admin-Laravel-10-2\vendor\php-flasher\flasher-laravel\Command\InstallCommand.php")
2 [internal]:0
Whoops\Run::handleShutdown()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.