Giter Site home page Giter Site logo

laravel-toastr's People

Contributors

antonio8101 avatar aoradev44 avatar brian2694 avatar tntsoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

laravel-toastr's Issues

Class 'Brian2694\Toastr\Toastr' not found (View: /home/176572.cloudwaysapps.com/arbuanfcyy/public_html/resources/views/welcome.blade.php)

Hello,
I am getting this error,
Class 'Brian2694\Toastr\Toastr' not found (View: /home/176572.cloudwaysapps.com/arbuanfcyy/public_html/resources/views/welcome.blade.php)

Here is my view file,
{!! Toastr::message() !!}

my controller
Toastr::success('API Key enter Successfully', 'Diagoh', ["positionClass" => "toast-top-center"]);

    return view('welcome', ['prod' => $statusCheck->ScriptTagId]);

Config Option

Hey @brian2694

Was curious if you could add a new config option for this.

$script = '<script type="text/javascript">';

So <script type="text/javascript"> can be configuarble. Reason being is so people like myself can add nonce and alike for use with Content Security Policies (CSP). That was this package can work with 'unsafe-inline'.

vitejs es6 type module

Thanks for this amazing package.

I had some issue moving from webpack to vitejs

Toastr.php

  public function message()
  {
      ...
-     $script = '<script type="text/javascript">';
+     $script = '<script type="module">';
      ...

Should we make this configurable?

Uncaught TypeError: I[E.showMethod] is not a function

So, I don't know if this is a package issue or not (I suspect not), but when I call the Toastr::(); function, Everything works, I got the session etc... but I get an error... Uncaught TypeError: I[E.showMethod] is not a function. Well I tried to execute toastr["success"]("test description", "test title") in the js terminal, but that does return the same issue... I never had problems with toastr before :(

Error Found?

I installed following the readme to a "T" but get following error.

FatalThrowableError in /home/UNIT3D_2.0/app/Http/Controllers/UserController.php line 85:
Class 'App\Http\Controllers\Toastr' not found

Toastr show in every routes

Greetings all,

First of all, thanks for the package!

I'm using it on a Laravel 8 project and i have a little issue. First, i've set this on my layout:

<!DOCTYPE html>
<html>

<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>

<body>
      ...
      <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.4/toastr.min.js" integrity="sha512-lbwH47l/tPXJYG9AcFNoJaTMhGvYWhVM9YI43CT+uteTRRaiLCui8snIgyAN8XWgNjNhCqlAUdzZptso6OCoFQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

     {!! Toastr::message() !!}
</body>
</html>

Then, on my controller i have a method where i fire a Toastr and return a view:

 public function dashboard() {

   Toastr::success('Messages in here', 'Title', ["positionClass" => "toast-top-center"]);

   return view('admin.dashboard');

}

and that works fine but when i go to another route where i don't have any Toastr, the same Toastr get's fired...

Am i missing something here?

Thanks for the help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.