Skip to content

Latest commit

 

History

History
144 lines (108 loc) · 6.25 KB

File metadata and controls

144 lines (108 loc) · 6.25 KB
title description keywords tags image
Introduction | Laravel Like
A comprehensive Laravel package for adding like, dislike, and love interactions to your Eloquent models with ease.
laravel like
interactions
social features
likes
dislikes
loves
laravel package
eloquent
social engagement
Introduction
Features
Installation
Configuration
Usage
API
Examples
Laravel Package
/images/laravel-like-docs-thumb.webp

Laravel Like Package

A powerful and flexible Laravel package that adds social interaction features to your Eloquent models with minimal setup.

Laravel Like Package

✨ Features

  • Multiple Interaction Types: Support for likes, dislikes, and loves out of the box
  • Fully Extensible: Easily add custom interaction types
  • Efficient Queries: Optimized database queries for high performance
  • Polymorphic Relationships: Works with any Eloquent model
  • Flexible Configuration: Customize table names, model references, and more
  • Comprehensive API: Simple, intuitive methods for all interaction types
  • Query Scopes: Powerful filtering and sorting capabilities
  • UUID Support: Optional UUID support for primary keys
  • Caching: Built-in caching for better performance
  • Event-Driven: Fires events for all interactions

🚀 Getting Started

Requirements

  • PHP 8.1 or higher
  • Laravel 9.0 or higher
  • Composer

Installation

  1. Install the package via Composer:
composer require cslant/laravel-like
  1. Publish the configuration file and migrations:
php artisan vendor:publish --provider="CSlant\LaravelLike\Providers\LikeServiceProvider"
  1. Run the migrations:
php artisan migrate

🔧 Configuration

The package comes with sensible defaults, but you can customize its behavior by modifying the config/like.php file. Key configuration options include:

  • is_uuids: Use UUIDs instead of auto-incrementing IDs
  • table_name: Customize the interactions table name
  • interaction_model: Specify a custom interaction model
  • users.model: Configure the user model
  • users.foreign_key: Set the user foreign key

📚 Documentation

Explore the comprehensive documentation to get the most out of Laravel Like:

🤝 Contributing

Contributions are welcome! Please see our contributing guide for details.

📄 License

This package is open-sourced software licensed under the MIT License.

🔗 Links

📊 Stats

License Latest Version Total Downloads Test Status Code Style Status Quality Score