PHPackages                             tafadzwa/socialbeings - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. tafadzwa/socialbeings

ActiveLibrary

tafadzwa/socialbeings
=====================

This is my package socialbeings

v1.0.0(1y ago)111[4 PRs](https://github.com/TafadzwaLawrence/SocialBeings/pulls)MITPHPPHP ^8.2.12CI passing

Since Feb 3Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/TafadzwaLawrence/SocialBeings)[ Packagist](https://packagist.org/packages/tafadzwa/socialbeings)[ Docs](https://github.com/tafadzwa/socialbeings)[ GitHub Sponsors]()[ RSS](/packages/tafadzwa-socialbeings/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (9)Versions (7)Used By (0)

Laravel-Socialbeings
====================

[](#laravel-socialbeings)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9382ec0c5bc666793a52f6afde44b7be17eb6cff68190b7c26c355a04912d238/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74616661647a77612f736f6369616c6265696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tafadzwa/socialbeings)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1c02e8bb437ef3664023f2eee6f8f58966d0e0878c3f41a6226529f339575ff2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f74616661647a77612f736f6369616c6265696e67732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/tafadzwa/socialbeings/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/dfe93bdbd817bc565a1c4e983774e07ba69ed876f2edc0a3624d0230df749def/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f74616661647a77612f736f6369616c6265696e67732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/tafadzwa/socialbeings/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/d415027c5a52cc12c480f341017c2e59cf3d6dadf02d8c7d96247618f3e41dfc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74616661647a77612f736f6369616c6265696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tafadzwa/socialbeings)

A powerful and flexible package designed to streamline and enhance user engagement within your Laravel applications. This package provides seamless integration for features such as **likes**, **favorites**, **subscriptions**, and **follows**, allowing you to easily implement and manage user interactions.

Key Features
------------

[](#key-features)

- **Likes**: Enable users to express their appreciation for content.
- **Favorites**: Allow users to save and revisit their preferred items.
- **Subscriptions**: Keep users updated with the latest content through notifications.
- **Follows**: Facilitate user connections and community building.

Elevate your application’s functionality and keep your users engaged with our comprehensive solution!

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require tafadzwa/socialbeings
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="socialbeings-migrations"
php artisan migrate
```

You can publish the config file with:s

```
php artisan vendor:publish --tag="socialbeings-config"
```

This is the contents of the published config file:

```
return [
    'use_uuids' => false, // Default to false, can be set to true by the user

    'user_table' => env('USER_TABLE', 'users'), // Default to 'users'
];
```

Following
---------

[](#following)

You can follow any model by using import the CanFollow Trait which enable a trait to follow another model

```
namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use TafadzwaLawrence\SocialBeings\Traits\CanFollow;

class User extends Authenticatable
{
    use CanFollow;
    // Other model properties and methods...
}
```

Then the model you want to follow add the following trait

```
