downgraded laravel

This commit is contained in:
Doar Mihai
2026-05-01 23:33:15 +03:00
parent 96e8fa3859
commit 99d2cc9a25
12 changed files with 898 additions and 779 deletions
+3
View File
@@ -11,6 +11,9 @@ use Illuminate\Console\Command;
#[Description('Remove expired and old job listings from the database')] #[Description('Remove expired and old job listings from the database')]
class CleanJobs extends Command class CleanJobs extends Command
{ {
protected $signature = 'jobs:clean {--days=30} {--force}';
protected $description = 'Remove expired and old job listings from the database';
/** /**
* Execute the console command. * Execute the console command.
*/ */
+3
View File
@@ -14,6 +14,9 @@ use Illuminate\Support\Facades\Log;
#[Description('Curate jobs by fetching tags from an external API')] #[Description('Curate jobs by fetching tags from an external API')]
class CurateJobs extends Command class CurateJobs extends Command
{ {
protected $signature = 'jobs:curate {--batch=50}';
protected $description = 'Curate jobs by fetching tags from an external API';
/** /**
* Execute the console command. * Execute the console command.
*/ */
+3
View File
@@ -12,6 +12,9 @@ use Illuminate\Support\Facades\DB;
#[Description('Find and remove duplicate job listings based on fingerprint')] #[Description('Find and remove duplicate job listings based on fingerprint')]
class DeduplicateJobs extends Command class DeduplicateJobs extends Command
{ {
protected $signature = 'jobs:deduplicate {--dry-run}';
protected $description = 'Find and remove duplicate job listings based on fingerprint';
/** /**
* Execute the console command. * Execute the console command.
*/ */
+3
View File
@@ -11,6 +11,9 @@ use Illuminate\Console\Command;
#[Description('Enrich job listings with additional data (categories, experience levels, etc.)')] #[Description('Enrich job listings with additional data (categories, experience levels, etc.)')]
class EnrichJobs extends Command class EnrichJobs extends Command
{ {
protected $signature = 'jobs:enrich {--batch=100}';
protected $description = 'Enrich job listings with additional data';
public function __construct( public function __construct(
private JobEnrichmentService $enrichmentService private JobEnrichmentService $enrichmentService
) { ) {
@@ -12,6 +12,9 @@ use Illuminate\Console\Command;
#[Description('Fetch adzuna job description from puppeteer.')] #[Description('Fetch adzuna job description from puppeteer.')]
class FetchAdzunaDescriptionCommand extends Command class FetchAdzunaDescriptionCommand extends Command
{ {
protected $signature = 'adzuna:enrich {url?}';
protected $description = 'Fetch adzuna job description from puppeteer.';
public function handle(): int public function handle(): int
{ {
$adzunaUrl = $this->argument('url'); $adzunaUrl = $this->argument('url');
+3
View File
@@ -12,6 +12,9 @@ use Illuminate\Console\Command;
#[Description('Fetch jobs from API sources and queue them for processing')] #[Description('Fetch jobs from API sources and queue them for processing')]
class FetchJobs extends Command class FetchJobs extends Command
{ {
protected $signature = 'jobs:fetch {source?} {--limit=50} {--sync}';
protected $description = 'Fetch jobs from API sources and queue them for processing';
/** /**
* Execute the console command. * Execute the console command.
*/ */
@@ -12,9 +12,9 @@ use Illuminate\Support\Facades\Http;
#[Description('Command description')] #[Description('Command description')]
class GenerateJobSummaryCommand extends Command class GenerateJobSummaryCommand extends Command
{ {
/** protected $signature = 'jobs:summary {--batch=50}';
* Execute the console command. protected $description = 'Generate AI summaries for jobs';
*/
public function handle() public function handle()
{ {
$batchSize = (int) $this->option('batch'); $batchSize = (int) $this->option('batch');
@@ -39,7 +39,8 @@ class GenerateJobSummaryCommand extends Command
$summary = $this->generateSummary($job); $summary = $this->generateSummary($job);
if ($summary) { if ($summary) {
$job->summary = $summary; $summary = str_replace('Summary:', "", $summary);
$job->summary = trim($summary);
$job->save(); $job->save();
} }
} }
@@ -11,6 +11,9 @@ use Illuminate\Console\Command;
#[Description('Optimize database tables and analyze statistics')] #[Description('Optimize database tables and analyze statistics')]
class OptimizeDatabaseCommand extends Command class OptimizeDatabaseCommand extends Command
{ {
protected $signature = 'db:optimize';
protected $description = 'Optimize database tables and analyze statistics';
public function __construct( public function __construct(
private QueryOptimizationService $optimizationService private QueryOptimizationService $optimizationService
) { ) {
+3
View File
@@ -12,6 +12,9 @@ use Illuminate\Console\Command;
#[Description('Test job API integrations by fetching sample jobs')] #[Description('Test job API integrations by fetching sample jobs')]
class TestJobApis extends Command class TestJobApis extends Command
{ {
protected $signature = 'jobs:test-apis {source?} {--limit=5}';
protected $description = 'Test job API integrations by fetching sample jobs';
/** /**
* Execute the console command. * Execute the console command.
*/ */
+6
View File
@@ -19,6 +19,12 @@ class User extends Authenticatable
/** @use HasFactory<UserFactory> */ /** @use HasFactory<UserFactory> */
use HasFactory, Notifiable; use HasFactory, Notifiable;
protected $fillable = [
'name',
'email',
'password',
];
/** /**
* Get the attributes that should be cast. * Get the attributes that should be cast.
* *
+9 -9
View File
@@ -10,19 +10,19 @@
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^8.3", "php": "^8.3",
"laravel/framework": "^13.0", "laravel/framework": "^12.0",
"laravel/tinker": "^3.0" "laravel/tinker": "^2.10"
}, },
"require-dev": { "require-dev": {
"fakerphp/faker": "^1.23", "fakerphp/faker": "^1.23",
"laravel/breeze": "^2.4", "laravel/breeze": "^2.3",
"laravel/pail": "^1.2.5", "laravel/pail": "^1.2",
"laravel/pint": "^1.27", "laravel/pint": "^1.13",
"laravel/sail": "^1.56", "laravel/sail": "^1.26",
"mockery/mockery": "^1.6", "mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.6", "nunomaduro/collision": "^8.1",
"pestphp/pest": "^4.6", "pestphp/pest": "^3.0",
"pestphp/pest-plugin-laravel": "^4.1" "pestphp/pest-plugin-laravel": "^3.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
Generated
+854 -766
View File
File diff suppressed because it is too large Load Diff