🛠 Change Default Interaction Model
Here is the default interaction model for Laravel Like package. You can customize the interaction model as per your requirements.
Path: config/like.php
'interaction_model' => \CSlant\LaravelLike\Models\Like::class,
Sometimes, you may want to change the default interaction model to customize the interactions as per your requirements. You can change the default interaction model by updating the interaction_model
key in the config/like.php
file.
Here is how you can change the default interaction model:
'interaction_model' => \App\Models\CustomInteraction::class,
And in the CustomInteraction
model, you need to extend the CSlant\LaravelLike\Models\Like
model.
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use CSlant\LaravelLike\Models\Like;
class CustomInteraction extends Like
{
// Define your custom interactions here
}
In the above example, we have changed the default interaction model to CustomInteraction
model. You can replace CustomInteraction
with your custom interaction model.