One Hat Cyber Team
Your IP:
216.73.216.30
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
proc
/
self
/
root
/
proc
/
thread-self
/
cwd
/
Edit File:
laravel-toastr.tar
src/Toastr.php 0000644 00000012271 15111173773 0007331 0 ustar 00 <?php namespace Brian2694\Toastr; use Illuminate\Session\SessionManager as Session; use Illuminate\Config\Repository as Config; use Illuminate\Support\MessageBag; class Toastr { /** * The session manager. * @var \Illuminate\Session\SessionManager */ protected $session; /** * The Config Handler. * * @var \Illuminate\Contracts\Config\Repository */ protected $config; /** * The messages in session. * * @var array */ protected $messages = []; function __construct(Session $session, Config $config) { $this->session = $session; $this->config = $config; } public function message() { $messages = $this->session->get('toastr::messages'); if (! $messages) $messages = []; $script = '<script type="text/javascript">'; foreach ($messages as $message) { $config = (array) $this->config->get('toastr.options'); if (count($message['options'])) { $config = array_merge($config, $message['options']); } if ($config) { $script .= 'toastr.options = ' . json_encode($config) . ';'; } $title = addslashes($message['title']) ?: null; $script .= 'toastr.' . $message['type'] . '(\'' . addslashes($message['message']) . "','$title" . '\');'; } $script .= '</script>'; return $script; } /** * * Add a flash message to session. * * @param string $type Must be one of info, success, warning, error. * @param string $message The flash message content. * @param string $title The flash message title. * @param array $options The custom options. * * @return void */ public function add($type, $message, $title = null, $options = []) { $types = ['error', 'info', 'success', 'warning']; if (! in_array($type, $types)) { throw new Exception("The $type remind message is not valid."); } $this->messages[] = [ 'type' => $type, 'title' => $title, 'message' => $message, 'options' => $options, ]; $this->session->flash('toastr::messages', $this->messages); } /** * Add an info flash message to session. * * @param string $message The flash message content. * @param string $title The flash message title. * @param array $options The custom options. * * @return void */ public function info($message, $title = null, $options = []) { if($message instanceof MessageBag) { $messageString = ""; foreach ($message->getMessages() as $messageArray) { foreach ($messageArray as $currentMessage) $messageString .= $currentMessage."<br>"; } $this->add('info', rtrim($messageString, "<br>"), $title, $options); } else $this->add('info', $message, $title, $options); } /** * Add a success flash message to session. * * @param string $message The flash message content. * @param string $title The flash message title. * @param array $options The custom options. * * @return void */ public function success($message, $title = null, $options = []) { if($message instanceof MessageBag) { $messageString = ""; foreach ($message->getMessages() as $messageArray) { foreach ($messageArray as $currentMessage) $messageString .= $currentMessage."<br>"; } $this->add('success', rtrim($messageString, "<br>"), $title, $options); } else $this->add('success', $message, $title, $options); } /** * Add an warning flash message to session. * * @param string $message The flash message content. * @param string $title The flash message title. * @param array $options The custom options. * * @return void */ public function warning($message, $title = null, $options = []) { if($message instanceof MessageBag) { $messageString = ""; foreach ($message->getMessages() as $messageArray) { foreach ($messageArray as $currentMessage) $messageString .= $currentMessage."<br>"; } $this->add('warning', rtrim($messageString, "<br>"), $title, $options); } else $this->add('warning', $message, $title, $options); } /** * Add an error flash message to session. * * @param string $message The flash message content. * @param string $title The flash message title. * @param array $options The custom options. * * @return void */ public function error($message, $title = null, $options = []) { if($message instanceof MessageBag) { $messageString = ""; foreach ($message->getMessages() as $messageArray) { foreach ($messageArray as $currentMessage) $messageString .= $currentMessage."<br>"; } $this->add('error', rtrim($messageString, "<br>"), $title, $options); } else $this->add('error', $message, $title, $options); } /** * Clear messages * * @return void */ public function clear() { $this->messages = []; } } src/helper.php 0000644 00000000317 15111173773 0007332 0 ustar 00 <?php if (! function_exists('toastr')) { /** * Return the instance of toastr. * * @return Brian2694\Toastr\Toastr */ function toastr() { return app('toastr'); } } src/Facades/Toastr.php 0000644 00000001247 15111173773 0010660 0 ustar 00 <?php namespace Brian2694\Toastr\Facades; use Illuminate\Support\Facades\Facade; /** * @method static message():string * @method static add( $type, $message, $title = null, $options = [] ):void * @method static info( $message, $title = null, $options = [] ):void * @method static success( $message, $title = null, $options = [] ):void * @method static warning( $message, $title = null, $options = [] ):void * @method static error( $message, $title = null, $options = [] ):void * @method static clear( $message, $title = null, $options = [] ):void */ class Toastr extends Facade { protected static function getFacadeAccessor() { return 'toastr'; } } src/Facades/error_log 0000644 00000000531 15111173773 0010603 0 ustar 00 [20-Nov-2025 02:18:49 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Facades\Facade" not found in /home/fluxyjvi/public_html/project/vendor/brian2694/laravel-toastr/src/Facades/Toastr.php:16 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/brian2694/laravel-toastr/src/Facades/Toastr.php on line 16 src/ToastrServiceProvider.php 0000644 00000001452 15111173773 0012364 0 ustar 00 <?php namespace Brian2694\Toastr; use Illuminate\Support\ServiceProvider; class ToastrServiceProvider extends ServiceProvider { /** * Bootstrap the application services. * * @return void */ public function boot() { $this->publishes([ __DIR__ . '/config/toastr.php' => config_path('toastr.php'), ], 'config'); } /** * Register the application services. * * @return void */ public function register() { $this->app->singleton('toastr', function ($app) { return new Toastr($app['session'], $app['config']); }); } /** * Get the services provider by the provider * * @return array */ public function provides() { return ['toastr']; } } src/error_log 0000644 00000001314 15111173773 0007255 0 ustar 00 [18-Nov-2025 04:20:20 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\ServiceProvider" not found in /home/fluxyjvi/public_html/project/vendor/brian2694/laravel-toastr/src/ToastrServiceProvider.php:6 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/brian2694/laravel-toastr/src/ToastrServiceProvider.php on line 6 [18-Nov-2025 14:40:27 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\ServiceProvider" not found in /home/fluxyjvi/public_html/project/vendor/brian2694/laravel-toastr/src/ToastrServiceProvider.php:6 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/brian2694/laravel-toastr/src/ToastrServiceProvider.php on line 6 src/config/toastr.php 0000644 00000001042 15111173773 0010630 0 ustar 00 <?php return [ 'options' => [ "closeButton" => false, "debug" => false, "newestOnTop" => false, "progressBar" => false, "positionClass" => "toast-top-right", "preventDuplicates" => false, "onclick" => null, "showDuration" => "300", "hideDuration" => "1000", "timeOut" => "5000", "extendedTimeOut" => "1000", "showEasing" => "swing", "hideEasing" => "linear", "showMethod" => "fadeIn", "hideMethod" => "fadeOut" ], ]; README.md 0000644 00000004610 15111173773 0006032 0 ustar 00 Inspired in whossun/laravel-toastr.. I cloned the repository brian2694/laravel-toastr to update to Laravel 5.5 # laravel-toastr | Laravel Version | Is Working? | | --- | --- | | 10.x | Yes | | 9.x | Yes | | 8.x | Yes | | 7.x | Yes | | 6.x | Yes | | >= 5.5 | Yes | | <= 5.4 | Yes | ### install Using Composer composer require brian2694/laravel-toastr ### Laravel >= 5.5 That's it! The package is auto-discovered on 5.5 and up! ### Laravel <= 5.4 Add the service provider to `config/app.php` ```php Brian2694\Toastr\ToastrServiceProvider::class, ``` Optionally include the Facade in config/app.php if you'd like. ```php 'Toastr' => Brian2694\Toastr\Facades\Toastr::class, ``` ### Options You can set custom options for Reminder. Run: php artisan vendor:publish to publish the config file for toastr. You can see [toastr's documentation](http://codeseven.github.io/toastr/demo.html) to custom your need. > You can use toastr() function available. ### Dependencies jQuery [toast](https://github.com/CodeSeven/toastr), you need to add css and js to your html. ### Basic * Toastr::info('message', 'title', ['options']); * Toastr::success('message', 'title', ['options']); * Toastr::warning('message', 'title', ['options']); * Toastr::error('message', 'title', ['options']); * Toastr::clear(); * Toastr()->info('message', 'title', ['options']); ```php <?php Route::get('/', function () { Toastr::success('Messages in here', 'Title', ["positionClass" => "toast-top-center"]); return view('welcome'); }); ``` Then You should add `{!! Toastr::message() !!}` to your html. ```html <!DOCTYPE html> <html> <head> <title>Laravel</title> <link rel="stylesheet" href="http://cdn.bootcss.com/toastr.js/latest/css/toastr.min.css"> </head> <body> <div class="container"> <div class="content"> <div class="title">Laravel 5</div> </div> </div> <script src="http://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script> <script src="http://cdn.bootcss.com/toastr.js/latest/js/toastr.min.js"></script> {!! Toastr::message() !!} </body> </html> ``` ## Contributors We'd like to thank the following individuals for their contributions to this project: - [Antonio Bruno](https://github.com/antonio8101) - Set DOC on the Facade class. composer.json 0000644 00000001650 15111173773 0007276 0 ustar 00 { "name": "brian2694/laravel-toastr", "description": "toastr.js for Laravel", "keywords": ["toastr", "notification", "laravel", "php"], "homepage": "https://github.com/brian2694/laravel-toastr", "license": "MIT", "authors": [ { "name": "brian2694", "email": "briansanchez2694@gmail.com" } ], "autoload": { "psr-4": { "Brian2694\\Toastr\\": "src/" }, "files": [ "src/helper.php" ] }, "extra": { "laravel": { "providers": [ "Brian2694\\Toastr\\ToastrServiceProvider" ], "aliases": { "Toastr": "Brian2694\\Toastr\\Facades\\Toastr" } } }, "minimum-stability": "dev", "require": { "php": ">=5.5.0", "illuminate/support": ">=5.2.7", "illuminate/session": ">=5.2.7" } }
Simpan