mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
fixed address branch as comments
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Jobs;
|
||||
|
||||
use App\Classes\Exceptions\MalformedRequestException;
|
||||
use App\Classes\Modules\Accounts\Services\ExpiresEmailVerificationAttempt;
|
||||
use App\Classes\Modules\Accounts\Services\ExpiresPasswordReset;
|
||||
use App\Models\PasswordReset;
|
||||
use App\Models\UserEmailVerification;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class EmailVerificationAttemptExpiration implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
|
||||
/** @var UserEmailVerification */
|
||||
private $attempt;
|
||||
|
||||
/**
|
||||
* EmailVerificationAttemptExpiration constructor.
|
||||
* @param UserEmailVerification $attempt
|
||||
*/
|
||||
public function __construct(UserEmailVerification $attempt)
|
||||
{
|
||||
$this->attempt = $attempt;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @throws MalformedRequestException
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
(new ExpiresEmailVerificationAttempt())->execute($this->attempt);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Jobs;
|
||||
|
||||
use App\Classes\Exceptions\MalformedRequestException;
|
||||
use App\Classes\Modules\Accounts\Services\ExpiresPasswordReset;
|
||||
use App\Models\PasswordReset;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class PasswordResetTokenExpiration implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
|
||||
/** @var PasswordReset */
|
||||
private $attempt;
|
||||
|
||||
/**
|
||||
* PasswordResetTokenExpiration constructor.
|
||||
* @param PasswordReset $attempt
|
||||
*/
|
||||
public function __construct(PasswordReset $attempt)
|
||||
{
|
||||
$this->attempt = $attempt;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @throws MalformedRequestException
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
(new ExpiresPasswordReset())->execute($this->attempt);
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Jobs;
|
||||
|
||||
use App\Classes\Notifications\ResetPasswordEmail;
|
||||
use App\Models\PasswordReset;
|
||||
use App\Models\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class SendResetPasswordEmail implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/** @var PasswordReset */
|
||||
private $attempt;
|
||||
|
||||
/**
|
||||
* SendResetPasswordEmail constructor.
|
||||
* @param User $user
|
||||
* @param PasswordReset $attempt
|
||||
*/
|
||||
public function __construct(User $user, PasswordReset $attempt)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->attempt = $attempt;
|
||||
}
|
||||
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$this->user->notify(new ResetPasswordEmail($this->user, $this->attempt));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Jobs;
|
||||
|
||||
use App\Classes\Notifications\UserVerificationEmail;
|
||||
use App\Models\User;
|
||||
use App\Models\UserEmailVerification;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class SendUserVerificationEmail implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/** @var UserEmailVerification */
|
||||
private $attempt;
|
||||
|
||||
/**
|
||||
* SendUserVerificationEmail constructor.
|
||||
* @param User $user
|
||||
* @param UserEmailVerification $attempt
|
||||
*/
|
||||
public function __construct(User $user, UserEmailVerification $attempt)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->attempt = $attempt;
|
||||
}
|
||||
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$this->user->notify(new UserVerificationEmail($this->user, $this->attempt));
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
@@ -15,7 +16,13 @@ class CreateStatesTable extends Migration
|
||||
{
|
||||
Schema::create('states', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('country_id')->unsigned();
|
||||
$table->string('name');
|
||||
$table->integer('status')->default(ApprovalStatus::APPROVED);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('country_id')->references('id')->on('countries');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user