-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #421 from BinaryStudioAcademy/develop
0.5.0
- Loading branch information
Showing
21 changed files
with
187 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace App\Jobs; | ||
|
||
use App\Entity\Event; | ||
use App\Notifications\EventCreatedNotificationToOwnerChatito; | ||
use Illuminate\Bus\Queueable; | ||
use Illuminate\Contracts\Queue\ShouldQueue; | ||
use Illuminate\Foundation\Bus\Dispatchable; | ||
use Illuminate\Queue\InteractsWithQueue; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class SendNotificationToOwnerChatito implements ShouldQueue | ||
{ | ||
use Dispatchable; | ||
use InteractsWithQueue; | ||
use Queueable; | ||
use SerializesModels; | ||
|
||
private Event $event; | ||
|
||
public function __construct(Event $event) | ||
{ | ||
$this->event = $event; | ||
} | ||
|
||
/** | ||
* Execute the job. | ||
* | ||
* @return void | ||
*/ | ||
public function handle() | ||
{ | ||
new EventCreatedNotificationToOwnerChatito($this->event); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
api/app/Notifications/EventCreatedNotificationToOwnerChatito.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace App\Notifications; | ||
|
||
use App\Entity\Event; | ||
use App\Entity\EventType; | ||
use App\Entity\User; | ||
use App\Notifications\Chatito\EventCreatedChatitoMessage; | ||
use Illuminate\Bus\Queueable; | ||
use Illuminate\Contracts\Queue\ShouldQueue; | ||
use Illuminate\Notifications\Notification; | ||
|
||
class EventCreatedNotificationToOwnerChatito extends Notification implements ShouldQueue | ||
{ | ||
use Queueable; | ||
|
||
private Event $event; | ||
|
||
public function __construct(Event $event) | ||
{ | ||
$this->event = $event; | ||
$this->toChatito(); | ||
} | ||
|
||
private function toChatito() | ||
{ | ||
return new EventCreatedChatitoMessage($this->event); | ||
} | ||
|
||
public function toArray($notifiable) | ||
{ | ||
return [ | ||
// | ||
]; | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
api/app/Notifications/EventCreatedNotificationToOwnerMail.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace App\Notifications; | ||
|
||
use App\Entity\Event; | ||
use App\Mail\EventCreatedMailToOwner; | ||
use Illuminate\Bus\Queueable; | ||
use Illuminate\Contracts\Queue\ShouldQueue; | ||
use Illuminate\Notifications\Notification; | ||
|
||
class EventCreatedNotificationToOwnerMail extends Notification implements ShouldQueue | ||
{ | ||
use Queueable; | ||
|
||
private Event $event; | ||
|
||
public function __construct(Event $event) | ||
{ | ||
$this->event = $event; | ||
} | ||
|
||
public function via($notifiable) | ||
{ | ||
return ['mail']; | ||
} | ||
|
||
public function toMail($notifiable) | ||
{ | ||
return new EventCreatedMailToOwner($this->event); | ||
} | ||
|
||
public function toArray($notifiable) | ||
{ | ||
return [ | ||
// | ||
]; | ||
} | ||
} |
Oops, something went wrong.