chore: code styling via pint
This commit is contained in:
@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Validator;
|
||||
class RemoteEmail extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'emails';
|
||||
|
||||
public function getConnectionName()
|
||||
@@ -20,7 +21,6 @@ class RemoteEmail extends Model
|
||||
return 'mysql_remote';
|
||||
}
|
||||
|
||||
|
||||
protected $fillable = [
|
||||
'message_id',
|
||||
'subject',
|
||||
@@ -42,12 +42,13 @@ class RemoteEmail extends Model
|
||||
public static function fetchEmailFromDB($email)
|
||||
{
|
||||
$validator = Validator::make(['email' => $email], [
|
||||
'email' => 'required|email'
|
||||
'email' => 'required|email',
|
||||
]);
|
||||
|
||||
if ($validator->fails()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return self::whereJsonContains('to', $email)->orderBy('timestamp', 'desc')->get();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user