PHP code example of php-flasher / flasher-toastr-symfony
1. Go to this page and download the library: Download php-flasher/flasher-toastr-symfony library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
php-flasher / flasher-toastr-symfony example snippets
// Global helper
toastr('Your changes have been saved!');
// In controller
public function save(): RedirectResponse
{
// Your logic...
toastr('Operation completed successfully!');
return $this->redirectToRoute('home');
}
// With options
toastr('Success message', [
'timeOut' => 5000,
'positionClass' => 'toast-top-right',
]);
bash
php bin/console flasher:install --config