Browse Source

add project user update notification, some clean code, queueing mail notification on redis

pull/1/head
mahdihty 4 years ago
parent
commit
d5c11b1281
  1. 10
      app/Console/Commands/CostCommand.php
  2. 20
      app/Events/BusinessUpdate.php
  3. 24
      app/Events/ProjectUserCreate.php
  4. 32
      app/Listeners/BusinessUpdateListener.php
  5. 5
      app/Listeners/BusinessUserCreateNotif.php
  6. 86
      app/Listeners/ProjectUserCreateNotif.php
  7. 16
      app/Models/Model.php
  8. 10
      app/Models/Project.php
  9. 14
      app/Notifications/DBNotification.php
  10. 2
      app/Notifications/FcmNotification.php
  11. 18
      app/Notifications/MailNotification.php
  12. 19
      app/Providers/EventServiceProvider.php
  13. 414
      composer.lock
  14. 16
      resources/lang/fa/notification.php

10
app/Console/Commands/CostCommand.php

@ -50,7 +50,7 @@ class CostCommand extends Command
// if calculated_at less than an hour stop
if ($now->diffInMinutes($business->calculated_at) <= 59) {
$this->info('Must be one hour after the last audit.');
Cache::put('lock', true, $now->diffInSeconds($business->calculated_at));
$this->ensureLockIsWritten();
continue;
}
@ -158,4 +158,12 @@ class CostCommand extends Command
return $file_fee * $duration;
}
public function ensureLockIsWritten(): void
{
Cache::put('lock', true, 3600);
while (Cache::get('lock', false) === false) {
// prevent
}
}
}

20
app/Events/BusinessUpdate.php

@ -0,0 +1,20 @@
<?php
namespace App\Events;
use Illuminate\Queue\SerializesModels;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
class BusinessUpdate
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $message;
public function __construct($message)
{
$this->message = $message;
}
}

24
app/Events/ProjectUserCreate.php

@ -0,0 +1,24 @@
<?php
namespace App\Events;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class ProjectUserCreate
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $message;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($message)
{
$this->message = $message;
}
}

32
app/Listeners/BusinessUpdateListener.php

@ -0,0 +1,32 @@
<?php
namespace App\Listeners;
use App\Models\User;
use App\Models\Business;
use Illuminate\Support\Arr;
use App\Events\BusinessUpdate;
use App\Events\BusinessUserCreate;
use App\Notifications\DBNotification;
use App\Notifications\MailNotification;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Notification;
class BusinessUpdateListener
{
public function handle(BusinessUpdate $event)
{
$payload = $event->message;
$wallet = $payload?->data?->diff?->wallet;
$owners = Business::findOrFail($payload->business)->owners;
$message = ['body' => 'Test'];
if ($wallet < 0) {
Notification::send($owners, new MailNotification($message));
Notification::send($owners, new DBNotification($message));
}
}
}

5
app/Listeners/BusinessUserCreateNotif.php

@ -34,6 +34,9 @@ class BusinessUserCreateNotif
public function handle(BusinessUserCreate $event)
{
$payload = $event->message;
if ($payload->data->original->level === enum('levels.inactive.id')) {
return;
}
$new_user = User::findOrFail($payload->data->original->user_id);
$owners = Business::findOrFail($payload->business)->owners()->where('id', '!=', $new_user->id)->get();
@ -59,7 +62,7 @@ class BusinessUserCreateNotif
* @return array|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Translation\Translator|string|null
*
*/
public function getMessageLine($payload, $key, $options = null)
public function getMessageLine($payload, $key, $options = [])
{
return __('notification.'.$payload->data->table_name.'.'.enum('cruds.inverse.'.$payload->data->crud_id.'.singular_name').'.'.$key, $options);
}

86
app/Listeners/ProjectUserCreateNotif.php

@ -0,0 +1,86 @@
<?php
namespace App\Listeners;
use App\Events\ProjectUserCreate;
use App\Models\Project;
use App\Models\User;
use App\Notifications\DBNotification;
use App\Notifications\FcmNotification;
use App\Notifications\MailNotification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Support\Facades\Notification;
class ProjectUserCreateNotif
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param ProjectUserCreate $event
* @return void
*/
public function handle(ProjectUserCreate $event)
{
$payload = $event->message;
$new_user = User::findOrFail($payload->data->original->user_id);
$project = Project::findOrFail($payload->data->original->project_id);
$owners_id = request('_business_info')['info']['projects'][$project->id]['members']->reject(function ($item, $key) use ($new_user) {
return $item['level'] < enum('levels.owner.id') || $key === $new_user->id;
})->toArray();
$owners = User::whereIn('id', array_keys($owners_id))->get();
$notif = $this->makeNotif($payload,['project' => $project->name, 'user' => $new_user->name]);
$users = $owners->prepend($new_user);
$this->sendNotifications($users, $notif);
}
public function makeNotif($payload, $options = []) {
return [
'greeting' => $this->getMessageLine($payload, 'greeting'),
'subject' => $this->getMessageLine($payload, 'subject'),
'title' => $this->getMessageLine($payload, 'title'),
'body' => $this->getMessageLine($payload, 'body', $options)
];
}
/**
* Fetch message from notifications lang file
*
* @param $payload
* @param $key
* @param null $options
* @return array|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Translation\Translator|string|null
*
*/
public function getMessageLine($payload, $key, $options = [])
{
return __('notification.'.$payload->data->table_name.'.'.enum('cruds.inverse.'.$payload->data->crud_id.'.singular_name').'.'.$key, $options);
}
/**
* Call notifications
*
* @param $users
* @param $notif
*/
public function sendNotifications($users, $notif) {
Notification::send($users, new MailNotification($notif));
Notification::send($users, new DBNotification($notif));
Notification::send($users, new FcmNotification($notif));
}
}

16
app/Models/Model.php

@ -191,23 +191,7 @@ class Model extends EloquentModel
'from' => env('CONTAINER_NAME'),
];
// $message = new PublishableMessage(json_encode($payload));
ModelSaved::dispatch(json_encode($payload));
// $routers = [
// "activity_exchange" => ["name" => "activity",],
// "notif_exchange" => ["name" => "notif",],
// "socket_exchange" => ["name" => "socket",],
// ];
//
// foreach ($routers as $exchange => $properties) {
// $message->setProperties(["application_headers" => new AMQPTable($properties)]);
//
// $message->setExchange(new Exchange($exchange));
//
// Amqp::publish($message, "");
// }
}
/**

10
app/Models/Project.php

@ -88,13 +88,15 @@ class Project extends Model implements HasMedia
public function members()
{
$permissions = self::$permissions;
return $this->belongsToMany(
User::class, 'project_user', 'project_id', 'user_id',
'id', 'id', __FUNCTION__
)->using(ReportableRelation::class)
return $this->belongsToMany(User::class)->using(ReportableRelation::class)
->withPivot($permissions);
}
public function owners()
{
return $this->members()->wherePivot('level', '=', enum('levels.owner.id'));
}
public function tasks()
{
return $this->hasMany(Task::class, 'project_id', 'id');

14
app/Notifications/DBNotification.php

@ -34,20 +34,6 @@ class DBNotification extends Notification
return ['database'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->line('The introduction to the notification.')
->action('Notification Action', url('/'))
->line('Thank you for using our application!');
}
/**
* Get the array representation of the notification.
*

2
app/Notifications/FcmNotification.php

@ -37,7 +37,7 @@ class FcmNotification extends Notification
* Get the voice representation of the notification.
*
* @param mixed $notifiable
* @return FCMMessage
* @return FcmMessage
*/
public function toFcm($notifiable)
{

18
app/Notifications/MailNotification.php

@ -7,7 +7,7 @@ use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class MailNotification extends Notification //implements ShouldQueue
class MailNotification extends Notification implements ShouldQueue
{
use Queueable;
@ -44,6 +44,9 @@ class MailNotification extends Notification //implements ShouldQueue
*/
public function __construct($message)
{
$this->connection = 'redis';
$this->queue = 'mail-queue';
$this->afterCommit = true;
$this->message = $message;
}
@ -72,17 +75,4 @@ class MailNotification extends Notification //implements ShouldQueue
->subject($this->message['subject'])
->action('Notification Action', url('/'));
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}

19
app/Providers/EventServiceProvider.php

@ -2,17 +2,20 @@
namespace App\Providers;
use App\Events\BusinessUserCreate;
use App\Events\ModelSaved;
use App\Events\ProjectUserCreate;
use App\Events\TagCreate;
use App\Listeners\ActivityRegistration;
use App\Listeners\BusinessUserCreateNotif;
use App\Events\ModelSaved;
use App\Events\BusinessUpdate;
use App\Listeners\NotifHandler;
use App\Listeners\ProjectUserCreateNotif;
use App\Listeners\TagCreateNotif;
use App\Events\BusinessUserCreate;
use Illuminate\Auth\Events\Registered;
use App\Listeners\ActivityRegistration;
use App\Listeners\BusinessUpdateListener;
use App\Listeners\BusinessUserCreateNotif;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
class EventServiceProvider extends ServiceProvider
{
@ -35,6 +38,12 @@ class EventServiceProvider extends ServiceProvider
BusinessUserCreate::class => [
BusinessUserCreateNotif::class,
],
ProjectUserCreate::class => [
ProjectUserCreateNotif::class,
],
BusinessUpdate::class => [
BusinessUpdateListener::class,
],
];
/**

414
composer.lock

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e612fae4cbef3c536c8e43cb7732d4cb",
"content-hash": "5fa03c0090cecfc0c45ad964962ea582",
"packages": [
{
"name": "anik/amqp",
@ -119,16 +119,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.173.20",
"version": "3.173.23",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "3e6143f5c12986d727307d5d19d6aec21575d903"
"reference": "259fa1a47a46f81e66b1ea328ed961a58fa061c2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3e6143f5c12986d727307d5d19d6aec21575d903",
"reference": "3e6143f5c12986d727307d5d19d6aec21575d903",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/259fa1a47a46f81e66b1ea328ed961a58fa061c2",
"reference": "259fa1a47a46f81e66b1ea328ed961a58fa061c2",
"shasum": ""
},
"require": {
@ -203,9 +203,9 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.173.20"
"source": "https://github.com/aws/aws-sdk-php/tree/3.173.23"
},
"time": "2021-03-02T19:13:50+00:00"
"time": "2021-03-05T19:20:35+00:00"
},
{
"name": "beberlei/assert",
@ -974,16 +974,16 @@
},
{
"name": "guzzlehttp/promises",
"version": "1.4.0",
"version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "60d379c243457e073cff02bc323a2a86cb355631"
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
"reference": "60d379c243457e073cff02bc323a2a86cb355631",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"shasum": ""
},
"require": {
@ -1023,9 +1023,9 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.4.0"
"source": "https://github.com/guzzle/promises/tree/1.4.1"
},
"time": "2020-09-30T07:37:28+00:00"
"time": "2021-03-07T09:25:29+00:00"
},
{
"name": "guzzlehttp/psr7",
@ -1178,16 +1178,16 @@
},
{
"name": "jaybizzle/crawler-detect",
"version": "v1.2.104",
"version": "v1.2.105",
"source": {
"type": "git",
"url": "https://github.com/JayBizzle/Crawler-Detect.git",
"reference": "a581e89a9212c4e9d18049666dc735718c29de9c"
"reference": "719c1ed49224857800c3dc40838b6b761d046105"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/a581e89a9212c4e9d18049666dc735718c29de9c",
"reference": "a581e89a9212c4e9d18049666dc735718c29de9c",
"url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/719c1ed49224857800c3dc40838b6b761d046105",
"reference": "719c1ed49224857800c3dc40838b6b761d046105",
"shasum": ""
},
"require": {
@ -1224,9 +1224,9 @@
],
"support": {
"issues": "https://github.com/JayBizzle/Crawler-Detect/issues",
"source": "https://github.com/JayBizzle/Crawler-Detect/tree/v1.2.104"
"source": "https://github.com/JayBizzle/Crawler-Detect/tree/v1.2.105"
},
"time": "2021-01-13T15:25:20+00:00"
"time": "2021-03-03T20:55:48+00:00"
},
{
"name": "jenssegers/agent",
@ -1313,16 +1313,16 @@
},
{
"name": "laravel/framework",
"version": "v8.30.0",
"version": "v8.31.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "81ef9850cc388f2f92b868fb35ffb76f0c9a0f46"
"reference": "2aa5c2488d25178ebc097052c7897a0e463ddc35"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/81ef9850cc388f2f92b868fb35ffb76f0c9a0f46",
"reference": "81ef9850cc388f2f92b868fb35ffb76f0c9a0f46",
"url": "https://api.github.com/repos/laravel/framework/zipball/2aa5c2488d25178ebc097052c7897a0e463ddc35",
"reference": "2aa5c2488d25178ebc097052c7897a0e463ddc35",
"shasum": ""
},
"require": {
@ -1477,7 +1477,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2021-03-02T14:28:44+00:00"
"time": "2021-03-04T15:22:36+00:00"
},
{
"name": "laravel/helpers",
@ -1591,103 +1591,6 @@
},
"time": "2020-10-27T14:25:32+00:00"
},
{
"name": "laravel/lumen-framework",
"version": "v8.2.3",
"source": {
"type": "git",
"url": "https://github.com/laravel/lumen-framework.git",
"reference": "6ed02d4d1a6e203b9e896bd105b2e838866f2951"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/lumen-framework/zipball/6ed02d4d1a6e203b9e896bd105b2e838866f2951",
"reference": "6ed02d4d1a6e203b9e896bd105b2e838866f2951",
"shasum": ""
},
"require": {
"dragonmantank/cron-expression": "^3.0.2",
"illuminate/auth": "^8.0",
"illuminate/broadcasting": "^8.0",
"illuminate/bus": "^8.0",
"illuminate/cache": "^8.0",
"illuminate/collections": "^8.0",
"illuminate/config": "^8.0",
"illuminate/console": "^8.0",
"illuminate/container": "^8.0",
"illuminate/contracts": "^8.0",
"illuminate/database": "^8.0",
"illuminate/encryption": "^8.0",
"illuminate/events": "^8.0",
"illuminate/filesystem": "^8.0",
"illuminate/hashing": "^8.0",
"illuminate/http": "^8.0",
"illuminate/log": "^8.0",
"illuminate/macroable": "^8.0",
"illuminate/pagination": "^8.0",
"illuminate/pipeline": "^8.0",
"illuminate/queue": "^8.0",
"illuminate/support": "^8.0",
"illuminate/testing": "^8.0",
"illuminate/translation": "^8.0",
"illuminate/validation": "^8.0",
"illuminate/view": "^8.0",
"nikic/fast-route": "^1.3",
"php": "^7.3|^8.0",
"symfony/console": "^5.1",
"symfony/error-handler": "^5.1",
"symfony/http-foundation": "^5.1",
"symfony/http-kernel": "^5.1",
"symfony/mime": "^5.1",
"symfony/var-dumper": "^5.1",
"vlucas/phpdotenv": "^5.2"
},
"require-dev": {
"mockery/mockery": "^1.4.2",
"phpunit/phpunit": "^8.5.8|^9.3.3"
},
"suggest": {
"laravel/tinker": "Required to use the tinker console command (^2.0).",
"nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).",
"symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "8.x-dev"
}
},
"autoload": {
"psr-4": {
"Laravel\\Lumen\\": "src/"
},
"files": [
"src/helpers.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Taylor Otwell",
"email": "taylorotwell@gmail.com"
}
],
"description": "The Laravel Lumen Framework.",
"homepage": "https://lumen.laravel.com",
"keywords": [
"framework",
"laravel",
"lumen"
],
"support": {
"issues": "https://github.com/laravel/lumen-framework/issues",
"source": "https://github.com/laravel/lumen-framework"
},
"time": "2021-02-09T16:42:36+00:00"
},
{
"name": "laravel/socialite",
"version": "v5.2.2",
@ -2730,16 +2633,16 @@
},
{
"name": "nesbot/carbon",
"version": "2.45.1",
"version": "2.46.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "528783b188bdb853eb21239b1722831e0f000a8d"
"reference": "2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/528783b188bdb853eb21239b1722831e0f000a8d",
"reference": "528783b188bdb853eb21239b1722831e0f000a8d",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4",
"reference": "2fd2c4a77d58a4e95234c8a61c5df1f157a91bf4",
"shasum": ""
},
"require": {
@ -2819,57 +2722,7 @@
"type": "tidelift"
}
],
"time": "2021-02-11T18:30:17+00:00"
},
{
"name": "nikic/fast-route",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/FastRoute.git",
"reference": "181d480e08d9476e61381e04a71b34dc0432e812"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812",
"reference": "181d480e08d9476e61381e04a71b34dc0432e812",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35|~5.7"
},
"type": "library",
"autoload": {
"psr-4": {
"FastRoute\\": "src/"
},
"files": [
"src/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Nikita Popov",
"email": "nikic@php.net"
}
],
"description": "Fast request router for PHP",
"keywords": [
"router",
"routing"
],
"support": {
"issues": "https://github.com/nikic/FastRoute/issues",
"source": "https://github.com/nikic/FastRoute/tree/master"
},
"time": "2018-02-13T20:26:39+00:00"
"time": "2021-02-24T17:30:44+00:00"
},
{
"name": "nikic/php-parser",
@ -3302,27 +3155,22 @@
},
{
"name": "psr/container",
"version": "1.0.0",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
"php": ">=7.2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
@ -3335,7 +3183,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
@ -3349,9 +3197,9 @@
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/master"
"source": "https://github.com/php-fig/container/tree/1.1.1"
},
"time": "2017-02-14T16:28:37+00:00"
"time": "2021-03-05T17:36:06+00:00"
},
{
"name": "psr/event-dispatcher",
@ -4021,16 +3869,16 @@
},
{
"name": "spatie/laravel-medialibrary",
"version": "9.4.2",
"version": "9.4.3",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-medialibrary.git",
"reference": "fe8dcb2a56b3061cd29d072c1e983a1e035a1671"
"reference": "2eae7416a6d7762e147f26f6cac7cf099eda109b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/fe8dcb2a56b3061cd29d072c1e983a1e035a1671",
"reference": "fe8dcb2a56b3061cd29d072c1e983a1e035a1671",
"url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/2eae7416a6d7762e147f26f6cac7cf099eda109b",
"reference": "2eae7416a6d7762e147f26f6cac7cf099eda109b",
"shasum": ""
},
"require": {
@ -4109,7 +3957,7 @@
],
"support": {
"issues": "https://github.com/spatie/laravel-medialibrary/issues",
"source": "https://github.com/spatie/laravel-medialibrary/tree/9.4.2"
"source": "https://github.com/spatie/laravel-medialibrary/tree/9.4.3"
},
"funding": [
{
@ -4121,7 +3969,7 @@
"type": "github"
}
],
"time": "2021-01-15T07:55:54+00:00"
"time": "2021-03-07T18:42:19+00:00"
},
{
"name": "spatie/laravel-query-builder",
@ -4246,16 +4094,16 @@
},
{
"name": "swiftmailer/swiftmailer",
"version": "v6.2.5",
"version": "v6.2.6",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "698a6a9f54d7eb321274de3ad19863802c879fb7"
"reference": "d2791ff0b73247cdc2096b14f5580aba40c12bff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/698a6a9f54d7eb321274de3ad19863802c879fb7",
"reference": "698a6a9f54d7eb321274de3ad19863802c879fb7",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/d2791ff0b73247cdc2096b14f5580aba40c12bff",
"reference": "d2791ff0b73247cdc2096b14f5580aba40c12bff",
"shasum": ""
},
"require": {
@ -4305,7 +4153,7 @@
],
"support": {
"issues": "https://github.com/swiftmailer/swiftmailer/issues",
"source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.5"
"source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.6"
},
"funding": [
{
@ -4317,20 +4165,20 @@
"type": "tidelift"
}
],
"time": "2021-01-12T09:35:59+00:00"
"time": "2021-03-05T12:08:49+00:00"
},
{
"name": "symfony/console",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a"
"reference": "d6d0cc30d8c0fda4e7b213c20509b0159a8f4556"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/89d4b176d12a2946a1ae4e34906a025b7b6b135a",
"reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a",
"url": "https://api.github.com/repos/symfony/console/zipball/d6d0cc30d8c0fda4e7b213c20509b0159a8f4556",
"reference": "d6d0cc30d8c0fda4e7b213c20509b0159a8f4556",
"shasum": ""
},
"require": {
@ -4398,7 +4246,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v5.2.3"
"source": "https://github.com/symfony/console/tree/v5.2.4"
},
"funding": [
{
@ -4414,11 +4262,11 @@
"type": "tidelift"
}
],
"time": "2021-01-28T22:06:19+00:00"
"time": "2021-02-23T10:08:49+00:00"
},
{
"name": "symfony/css-selector",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
@ -4463,7 +4311,7 @@
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/css-selector/tree/v5.2.3"
"source": "https://github.com/symfony/css-selector/tree/v5.2.4"
},
"funding": [
{
@ -4550,16 +4398,16 @@
},
{
"name": "symfony/error-handler",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
"reference": "48f18b3609e120ea66d59142c23dc53e9562c26d"
"reference": "b547d3babcab5c31e01de59ee33e9d9c1421d7d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/48f18b3609e120ea66d59142c23dc53e9562c26d",
"reference": "48f18b3609e120ea66d59142c23dc53e9562c26d",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/b547d3babcab5c31e01de59ee33e9d9c1421d7d0",
"reference": "b547d3babcab5c31e01de59ee33e9d9c1421d7d0",
"shasum": ""
},
"require": {
@ -4599,7 +4447,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/error-handler/tree/v5.2.3"
"source": "https://github.com/symfony/error-handler/tree/v5.2.4"
},
"funding": [
{
@ -4615,20 +4463,20 @@
"type": "tidelift"
}
],
"time": "2021-01-28T22:06:19+00:00"
"time": "2021-02-11T08:21:20+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "4f9760f8074978ad82e2ce854dff79a71fe45367"
"reference": "d08d6ec121a425897951900ab692b612a61d6240"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4f9760f8074978ad82e2ce854dff79a71fe45367",
"reference": "4f9760f8074978ad82e2ce854dff79a71fe45367",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d08d6ec121a425897951900ab692b612a61d6240",
"reference": "d08d6ec121a425897951900ab692b612a61d6240",
"shasum": ""
},
"require": {
@ -4684,7 +4532,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v5.2.3"
"source": "https://github.com/symfony/event-dispatcher/tree/v5.2.4"
},
"funding": [
{
@ -4700,7 +4548,7 @@
"type": "tidelift"
}
],
"time": "2021-01-27T10:36:42+00:00"
"time": "2021-02-18T17:12:37+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@ -4783,16 +4631,16 @@
},
{
"name": "symfony/finder",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "4adc8d172d602008c204c2e16956f99257248e03"
"reference": "0d639a0943822626290d169965804f79400e6a04"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/4adc8d172d602008c204c2e16956f99257248e03",
"reference": "4adc8d172d602008c204c2e16956f99257248e03",
"url": "https://api.github.com/repos/symfony/finder/zipball/0d639a0943822626290d169965804f79400e6a04",
"reference": "0d639a0943822626290d169965804f79400e6a04",
"shasum": ""
},
"require": {
@ -4824,7 +4672,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v5.2.3"
"source": "https://github.com/symfony/finder/tree/v5.2.4"
},
"funding": [
{
@ -4840,7 +4688,7 @@
"type": "tidelift"
}
],
"time": "2021-01-28T22:06:19+00:00"
"time": "2021-02-15T18:55:04+00:00"
},
{
"name": "symfony/http-client-contracts",
@ -4923,16 +4771,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "20c554c0f03f7cde5ce230ed248470cccbc34c36"
"reference": "54499baea7f7418bce7b5ec92770fd0799e8e9bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/20c554c0f03f7cde5ce230ed248470cccbc34c36",
"reference": "20c554c0f03f7cde5ce230ed248470cccbc34c36",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/54499baea7f7418bce7b5ec92770fd0799e8e9bf",
"reference": "54499baea7f7418bce7b5ec92770fd0799e8e9bf",
"shasum": ""
},
"require": {
@ -4976,7 +4824,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v5.2.3"
"source": "https://github.com/symfony/http-foundation/tree/v5.2.4"
},
"funding": [
{
@ -4992,20 +4840,20 @@
"type": "tidelift"
}
],
"time": "2021-02-03T04:42:09+00:00"
"time": "2021-02-25T17:16:57+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "89bac04f29e7b0b52f9fa6a4288ca7a8f90a1a05"
"reference": "c452dbe4f385f030c3957821bf921b13815d6140"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/89bac04f29e7b0b52f9fa6a4288ca7a8f90a1a05",
"reference": "89bac04f29e7b0b52f9fa6a4288ca7a8f90a1a05",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/c452dbe4f385f030c3957821bf921b13815d6140",
"reference": "c452dbe4f385f030c3957821bf921b13815d6140",
"shasum": ""
},
"require": {
@ -5040,7 +4888,7 @@
"psr/log-implementation": "1.0"
},
"require-dev": {
"psr/cache": "~1.0",
"psr/cache": "^1.0|^2.0|^3.0",
"symfony/browser-kit": "^4.4|^5.0",
"symfony/config": "^5.0",
"symfony/console": "^4.4|^5.0",
@ -5088,7 +4936,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v5.2.3"
"source": "https://github.com/symfony/http-kernel/tree/v5.2.4"
},
"funding": [
{
@ -5104,20 +4952,20 @@
"type": "tidelift"
}
],
"time": "2021-02-03T04:51:58+00:00"
"time": "2021-03-04T18:05:55+00:00"
},
{
"name": "symfony/mime",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/mime.git",
"reference": "7dee6a43493f39b51ff6c5bb2bd576fe40a76c86"
"reference": "5155d2fe14ef1eb150e3bdbbc1ec1455df95e9cd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/7dee6a43493f39b51ff6c5bb2bd576fe40a76c86",
"reference": "7dee6a43493f39b51ff6c5bb2bd576fe40a76c86",
"url": "https://api.github.com/repos/symfony/mime/zipball/5155d2fe14ef1eb150e3bdbbc1ec1455df95e9cd",
"reference": "5155d2fe14ef1eb150e3bdbbc1ec1455df95e9cd",
"shasum": ""
},
"require": {
@ -5170,7 +5018,7 @@
"mime-type"
],
"support": {
"source": "https://github.com/symfony/mime/tree/v5.2.3"
"source": "https://github.com/symfony/mime/tree/v5.2.4"
},
"funding": [
{
@ -5186,7 +5034,7 @@
"type": "tidelift"
}
],
"time": "2021-02-02T06:10:15+00:00"
"time": "2021-02-15T18:55:04+00:00"
},
{
"name": "symfony/polyfill-ctype",
@ -5919,7 +5767,7 @@
},
{
"name": "symfony/process",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
@ -5961,7 +5809,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v5.2.3"
"source": "https://github.com/symfony/process/tree/v5.2.4"
},
"funding": [
{
@ -5981,16 +5829,16 @@
},
{
"name": "symfony/routing",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
"reference": "348b5917e56546c6d96adbf21d7f92c9ef563661"
"reference": "cafa138128dfd6ab6be1abf6279169957b34f662"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/348b5917e56546c6d96adbf21d7f92c9ef563661",
"reference": "348b5917e56546c6d96adbf21d7f92c9ef563661",
"url": "https://api.github.com/repos/symfony/routing/zipball/cafa138128dfd6ab6be1abf6279169957b34f662",
"reference": "cafa138128dfd6ab6be1abf6279169957b34f662",
"shasum": ""
},
"require": {
@ -6051,7 +5899,7 @@
"url"
],
"support": {
"source": "https://github.com/symfony/routing/tree/v5.2.3"
"source": "https://github.com/symfony/routing/tree/v5.2.4"
},
"funding": [
{
@ -6067,7 +5915,7 @@
"type": "tidelift"
}
],
"time": "2021-01-27T10:15:41+00:00"
"time": "2021-02-22T15:48:39+00:00"
},
{
"name": "symfony/service-contracts",
@ -6150,16 +5998,16 @@
},
{
"name": "symfony/string",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "c95468897f408dd0aca2ff582074423dd0455122"
"reference": "4e78d7d47061fa183639927ec40d607973699609"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/c95468897f408dd0aca2ff582074423dd0455122",
"reference": "c95468897f408dd0aca2ff582074423dd0455122",
"url": "https://api.github.com/repos/symfony/string/zipball/4e78d7d47061fa183639927ec40d607973699609",
"reference": "4e78d7d47061fa183639927ec40d607973699609",
"shasum": ""
},
"require": {
@ -6213,7 +6061,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.2.3"
"source": "https://github.com/symfony/string/tree/v5.2.4"
},
"funding": [
{
@ -6229,20 +6077,20 @@
"type": "tidelift"
}
],
"time": "2021-01-25T15:14:59+00:00"
"time": "2021-02-16T10:20:28+00:00"
},
{
"name": "symfony/translation",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "c021864d4354ee55160ddcfd31dc477a1bc77949"
"reference": "74b0353ab34ff4cca827a2cf909e325d96815e60"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/c021864d4354ee55160ddcfd31dc477a1bc77949",
"reference": "c021864d4354ee55160ddcfd31dc477a1bc77949",
"url": "https://api.github.com/repos/symfony/translation/zipball/74b0353ab34ff4cca827a2cf909e325d96815e60",
"reference": "74b0353ab34ff4cca827a2cf909e325d96815e60",
"shasum": ""
},
"require": {
@ -6259,7 +6107,7 @@
"symfony/yaml": "<4.4"
},
"provide": {
"symfony/translation-implementation": "2.0"
"symfony/translation-implementation": "2.3"
},
"require-dev": {
"psr/log": "~1.0",
@ -6306,7 +6154,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/translation/tree/v5.2.3"
"source": "https://github.com/symfony/translation/tree/v5.2.4"
},
"funding": [
{
@ -6322,7 +6170,7 @@
"type": "tidelift"
}
],
"time": "2021-01-27T10:15:41+00:00"
"time": "2021-03-04T15:41:09+00:00"
},
{
"name": "symfony/translation-contracts",
@ -6404,16 +6252,16 @@
},
{
"name": "symfony/var-dumper",
"version": "v5.2.3",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "72ca213014a92223a5d18651ce79ef441c12b694"
"reference": "6a81fec0628c468cf6d5c87a4d003725e040e223"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/72ca213014a92223a5d18651ce79ef441c12b694",
"reference": "72ca213014a92223a5d18651ce79ef441c12b694",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/6a81fec0628c468cf6d5c87a4d003725e040e223",
"reference": "6a81fec0628c468cf6d5c87a4d003725e040e223",
"shasum": ""
},
"require": {
@ -6472,7 +6320,7 @@
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.2.3"
"source": "https://github.com/symfony/var-dumper/tree/v5.2.4"
},
"funding": [
{
@ -6488,7 +6336,7 @@
"type": "tidelift"
}
],
"time": "2021-01-27T10:15:41+00:00"
"time": "2021-02-18T23:11:19+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
@ -7031,16 +6879,16 @@
},
{
"name": "facade/ignition",
"version": "2.5.13",
"version": "2.5.14",
"source": {
"type": "git",
"url": "https://github.com/facade/ignition.git",
"reference": "5e9ef386aaad9985cee2ac23281a27568d083b7e"
"reference": "17097f7a83e200d90d1cf9f4d1b35c1001513a47"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/facade/ignition/zipball/5e9ef386aaad9985cee2ac23281a27568d083b7e",
"reference": "5e9ef386aaad9985cee2ac23281a27568d083b7e",
"url": "https://api.github.com/repos/facade/ignition/zipball/17097f7a83e200d90d1cf9f4d1b35c1001513a47",
"reference": "17097f7a83e200d90d1cf9f4d1b35c1001513a47",
"shasum": ""
},
"require": {
@ -7104,7 +6952,7 @@
"issues": "https://github.com/facade/ignition/issues",
"source": "https://github.com/facade/ignition"
},
"time": "2021-02-16T12:46:19+00:00"
"time": "2021-03-04T08:48:01+00:00"
},
{
"name": "facade/ignition-contracts",
@ -7335,16 +7183,16 @@
},
{
"name": "laravel/sail",
"version": "v1.4.4",
"version": "v1.4.6",
"source": {
"type": "git",
"url": "https://github.com/laravel/sail.git",
"reference": "67b76f430f8870f5a2384db5c87ff8321154e077"
"reference": "59ee7e2b2efeb644eabea719186db91d11666733"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/sail/zipball/67b76f430f8870f5a2384db5c87ff8321154e077",
"reference": "67b76f430f8870f5a2384db5c87ff8321154e077",
"url": "https://api.github.com/repos/laravel/sail/zipball/59ee7e2b2efeb644eabea719186db91d11666733",
"reference": "59ee7e2b2efeb644eabea719186db91d11666733",
"shasum": ""
},
"require": {
@ -7391,7 +7239,7 @@
"issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail"
},
"time": "2021-03-02T16:47:59+00:00"
"time": "2021-03-03T15:22:44+00:00"
},
{
"name": "mockery/mockery",

16
resources/lang/fa/notification.php

@ -24,6 +24,20 @@ return [
'title' => 'افزودن کاربر به کسب و کار',
'body' => 'کاربر :user به کسب و کار :business اضافه شد.'
]
]
],
'project_user' => [
'create' =>[
'greeting' => 'سلام کاربر گرامی!',
'subject' => 'افزودن کاربر به پروژه',
'title' => 'افزودن کاربر به پروژه',
'body' => 'کاربر :user به پروژه :project اضافه شد.'
]
],
'business' => [
'update' => 'کاربر :user به کسب و کار :business اضافه شد.',
'update_wallet' => 'پول رو میدی یا پولت کنم',
],
];
Loading…
Cancel
Save