Download the PHP package sangamkatwal/sangam-toastr without Composer

On this page you can find all versions of the php package sangamkatwal/sangam-toastr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sangam-toastr

πŸŽ‰ Sangam Toastr

Latest Version License

A simple and elegant Laravel package for Toastr notifications that works seamlessly with both session flash messages and AJAX responses.

Note: This is my first Laravel package! πŸš€ If anything isn't clear, feel free to reach out via email or create an issue.

✨ Features

πŸ“¦ Installation

πŸ”§ Setup

1. Publish Assets

2. Include Assets in Layout

Add to your layouts/app.blade.php (inside <head>):

3. Include Notifications

Add before closing </body> tag in your layout:

πŸš€ Usage

Session Flash Messages (Redirects)

AJAX Responses

Frontend AJAX Implementation

Mixed Request Types (AJAX + Regular)

Perfect for controllers that handle both AJAX and regular requests:

πŸ“‹ Notification Types

Type Usage
success βœ… Success operations
error ❌ Error messages
warning ⚠️ Warning alerts
info ℹ️ Information notices

βš™οΈ Requirements

πŸ” Validation Examples

See ValidationExamples.md for detailed examples with Laravel validation.

🀝 Contributing

This is my first package, so contributions and suggestions are very welcome!

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“ License

This package is open-sourced under the MIT license.

πŸ‘¨β€πŸ’» Author

Sangam Katwal - [email protected]

✍️ Note By Author

This README was written with the help of AI based on my inputs. If you notice anything unclear or incorrect, feel free to reach out to me via email.

The Toastr CSS and JS used in this package are from the original Toastr.js v2.1.3. This package is completely free and open-source.

The main reason I built this package is because I often had to dig through old projects just to copy my custom Toastr response logic. By turning it into a reusable package, I’ve made it easier for myselfβ€”and I’m sharing it publicly in case it simplifies things for others too.

πŸ‘¨β€πŸ’» Note For Developers

While this package encourages a simple and consistent response format (one notification type + one message), it does not restrict Laravel’s default flexibility. You can still attach additional values to your responses, whether for session flashes or AJAX.

For example:


// Redirect response with extra data
return redirect()->back()->with([
    'success' => true,
    'message' => 'Data saved successfully!',
    'status'  => 200,
    'extra'   => 'Any other value'
]);

// AJAX response with extra fields
return response()->json([
    'success' => true,
    'message' => 'Data saved successfully!',
    'status'  => 200,
    'data'    => ['id' => 123, 'name' => 'Sample']
]);

So, you still get all the power of Laravel responses while enjoying clean, consistent Toastr notifications. πŸš€

---

⭐ **Star this repo if it helped you!**

All versions of sangam-toastr with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
laravel/framework Version >=8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sangamkatwal/sangam-toastr contains the following files

Loading the files please wait ....