Download the PHP package jamesmills/watchable without Composer

On this page you can find all versions of the php package jamesmills/watchable. 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 watchable

Laravel Watchable

Packagist Packagist Travis Packagist Buy us a tree Treeware (Trees)

Enable users to watch various models in your application.

Installation

Pull in the package using Composer

composer require jamesmills/watchable

Note: If you are using Laravel 5.5, the next step for provider are unnecessary. Laravel Watchable supports Laravel Package Discovery.

Include the service provider within app/config/app.php.

Publish and run the database migrations

Sample Usage and Boilerplate

I wrote a blog post to give you some boilerplate code that you can use in your application to wrap around the Laravel Watchable package.

https://jamesmills.co.uk/2017/10/22/laravel-watchable-package

How to use

Prepare your model to be watched

Simply add the watchable trait to your model

Available methods

Watch a model

Unwatch a model

Toggle the watching of a model

You can optionally send the if you don't want to use the built in functionality.

Find out if the current user is watching the model

Get a collection of the user who are watching a model

Use with Notifications

One of the main reasons I built this package was to scratch my own itch with an application I am building. I wanted to be able to send notifications to user who were watching a given model and I also wanted to allow users to be able to watch a number of different models.

License

This package is 100% free and open-source, under the MIT license. Use it however you want.

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.


All versions of watchable with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
illuminate/support Version ~5.3.0 || ~5.4.0 || ~5.5.0 || 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
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 jamesmills/watchable contains the following files

Loading the files please wait ....