Download the PHP package nr-type/like-dislike without Composer

On this page you can find all versions of the php package nr-type/like-dislike. 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 like-dislike

Laravel Like Dislike Package

Issues Stars Forks Tags License Twitter

About Package

This is a package for developers who want to use like and dislike options in their applications, this is the easiest way to do that.

Installing

This package can be installed through Composer in your application :

Run the command.

Migration

After that run the Migration command :

Model Use

The model where you want to have like and dislike. You just need to use NrType\LikeDislike\Traits\Likeable and NrType\LikeDislike\Traits\Dislikeable. And inside the class use Likeable and Dislikeable.

You can use like dislike options in multiple Model

Multiple Model are can be Comment,Video,Photo.

Optional

Suppose you just only need Like option for your application. Then you use NrType\LikeDislike\Traits\Likeable and Likeable.

Compatibility

Like and Dislike can work individually and also both are compatible to work with each other, suppose someone like the post and after some time later thinks that he/she wants to dislike the post. He/she just simply click the dislike button, and it will remove his/her like on that particular post and dislike.

Uses in Controller

Like

Use like option in the post such as like 2 lines of code.

But

Suppose you want that someone's click like button then it will like the post and again he click liked button then it will unlike the post. Then here is removeLike(). if User alreay like that post it will remove that particular like in the same method or if you want you can create another route and method to unlike the post.

DisLike

Use dislike in the post same as like in post. For dislike options again you have dislike() and removeDislike()

Or

Likers and Dislikers on the Post

You can easily access likers and dislikers through likers() and dislikers(). default it will return with users id,name from users table.

Or

Now here has somethings

likers() and dislikers() default return id,name but you maybe don't need id, you may only need name or your users database table doesn't have name field, it can be first_name,last_name or maybe something else or maybe you need more then those fields. Here have a solution. You just pass a array in side the method. It will return those fields data form users table.

Or

with() relationship call in Controller

You can show likes, dislikes on posts and also want to show how many likes and dislike on posts with likeCounter, dislikeCounter.

Or

You may have comments on posts and you need comments and also need likes on particular comment and how many likes on comment. Then you can use comments.likes and comments.likeCounter.

Additional options

hasLike(), hasDislike() is for check that logged in user has like or dislike in post or comment. It return boolean. You can use hasLike() hasDislike() in blades file as well.

License

Like Dislike bucket is open-sourced software licensed under the MIT license.


All versions of like-dislike with dependencies

PHP Build Version
Package Version
No informations.
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 nr-type/like-dislike contains the following files

Loading the files please wait ....