1. Go to this page and download the library: Download mfrouh/activity-model library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mfrouh / activity-model example snippets
use MFrouh\ActivityModel\Interfaces\ActivityInterface;
use MFrouh\ActivityModel\Traits\ActivityModel;
class Order extends Model implements ActivityInterface
{
use ActivityModel;
public function activityChanges(): array
{
return [
'status' => [
'title_ar' => '',
'title_en' => '',
'message_ar' => '',
'message_en' => '',
],
];
}
public function activityDefault(): array
{
return [
'created' => [
'title_ar' => '',
'title_en' => '',
'message_ar' => '',
'message_en' => '',
],
'deleted' => [
'title_ar' => '',
'title_en' => '',
'message_ar' => '',
'message_en' => '',
],
'updated' => [
'title_ar' => '',
'title_en' => '',
'message_ar' => '',
'message_en' => '',
],
'restored' => [
'title_ar' => '',
'title_en' => '',
'message_ar' => '',
'message_en' => '',
],
];
}
public function activityFcmTokens(): array
{
return [];
}
}
bash
php artisan migrate
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.