Giter Club home page Giter Club logo

Comments (5)

yoeunes avatar yoeunes commented on May 18, 2024

Hello @2jiwon, thank you for using the yoeunes/toastr package. I noticed that you are currently using an outdated version of the package. To resolve any potential issues, I would recommend upgrading to the latest version by running the following command: composer require yoeunes/toastr::^2.3.

Additionally, I suggest removing all the code related to the outdated version from your blade template. This should help ensure that the latest version works seamlessly with your project. Thank you again for using this package, and please let me know if you have any questions or concerns.

from toastr.

2jiwon avatar 2jiwon commented on May 18, 2024

@yoeunes Thank you for your reply. I tried what you suggested composer require yoeunes/toastr::^2.3 then it says

 [UnexpectedValueException]                                                
  Could not parse version constraint :^2.3: Invalid version string ":^2.3"

so I also tried composer require yoeunes/toastr^2.3 just in case, but it didn't work either.

from toastr.

2jiwon avatar 2jiwon commented on May 18, 2024

@yoeunes oops, nevermind. it was because my composer version. I was able to update to 2.3.
However, the situation that showing up twice is still exists.

from toastr.

yoeunes avatar yoeunes commented on May 18, 2024

please remove all this code from your blade template:

@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

from toastr.

madfortech avatar madfortech commented on May 18, 2024

when i add this
layout app.blade.php
@toastr_css
@toastr_js
@toastr_render
Capture1

PHP 8.1.17 (cli) (built: Mar 14 2023 23:07:43) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.17, Copyright (c) Zend Technologies

laravel . 10.18.0 version

Here my PostController Code
$post = Post::create([
'title' => $request->input('title'),
'description' => $request->input('description'),
'slug' => Str::slug($request->input('title')), // Generate slug
]);

    if ($request->hasFile('avatar')) {
        $post->addMedia($request->file('avatar'))
            ->toMediaCollection('avatars'); // You can customize the collection name as needed
    }

    
    toastr()::success('Post created successfully!', 'Success'); // Display a success toast message
    //
          Undefined function 'App\Http\Controllers\toastr'
    //
    any one help me fix htis 

from toastr.

Related Issues (20)

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.