21 lines
380 B
PHP
21 lines
380 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Services\Article;
|
||
|
|
|
||
|
|
use App\Models\Article;
|
||
|
|
|
||
|
|
class ValidationService
|
||
|
|
{
|
||
|
|
public static function validate(Article $article): Article
|
||
|
|
{
|
||
|
|
logger('Checking keywords for article: ' . $article->id);
|
||
|
|
|
||
|
|
$article->update([
|
||
|
|
'is_valid' => true,
|
||
|
|
'validated_at' => now(),
|
||
|
|
]);
|
||
|
|
|
||
|
|
return $article->refresh();
|
||
|
|
}
|
||
|
|
}
|