forked from alaatv/vote
-
Notifications
You must be signed in to change notification settings - Fork 0
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 alaatv#15 from MohamadSH/master
mobile verification
- Loading branch information
Showing
5 changed files
with
86 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\User; | ||
use Illuminate\Queue\SerializesModels; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
|
||
class MobileVerificationCodeGenerated | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
public $user; | ||
public $generationTime; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param User $user | ||
* @param $generationTime | ||
*/ | ||
public function __construct(User $user , $generationTime=null) | ||
{ | ||
$this->user = $user; | ||
$this->generationTime = $generationTime; | ||
} | ||
|
||
} |
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,26 @@ | ||
<?php | ||
|
||
namespace App\Listeners; | ||
|
||
use App\Events\MobileVerificationCodeGenerated; | ||
use Illuminate\Queue\InteractsWithQueue; | ||
use Illuminate\Support\Facades\Log; | ||
|
||
class MobileVerificationCodeGeneratedListener | ||
{ | ||
use InteractsWithQueue; | ||
|
||
/** | ||
* Handle the event. | ||
* | ||
* @param object $event | ||
* @return void | ||
*/ | ||
public function handle(MobileVerificationCodeGenerated $event) | ||
{ | ||
$timeStamp = $event->generationTime; | ||
$user = $event->user; | ||
// Carbon::createFromTimestamp($timeStamp); | ||
Log::info('MobileVerificationCodeGeneratedListener : '.$user->id.' - '.$timeStamp); | ||
} | ||
} |
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