Skip to content

Commit eeaaa7a

Browse files
authored
Merge pull request #239 from NotFoundNL/feat/update-dependencies
fix: console route caching
2 parents 19acc95 + 9ab9f36 commit eeaaa7a

File tree

3 files changed

+20
-26
lines changed

3 files changed

+20
-26
lines changed

composer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
"require-dev": {
3232
"laravel/pint": "^1.25.1",
3333
"nunomaduro/collision": "^6.0",
34-
"nunomaduro/larastan": "^2.0.1",
35-
"orchestra/testbench": "^8.9",
34+
"larastan/larastan": "^2.0.1",
3635
"pestphp/pest": "^1.21",
3736
"pestphp/pest-plugin-laravel": "^1.1",
3837
"phpstan/extension-installer": "^1.1",
@@ -56,7 +55,6 @@
5655
}
5756
},
5857
"scripts": {
59-
"post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
6058
"analyse": "vendor/bin/phpstan analyse",
6159
"test": "vendor/bin/pest",
6260
"test-coverage": "vendor/bin/pest --coverage",

routes/console.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/FrameworkServiceProvider.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
namespace NotFound\Framework;
44

5+
use Illuminate\Console\Command;
56
use Illuminate\Notifications\Messages\MailMessage;
67
use Illuminate\Support\Facades\App;
8+
use Illuminate\Support\Facades\Artisan;
79
use Illuminate\Support\Facades\Blade;
810
use Illuminate\Support\ServiceProvider;
911
use NotFound\Framework\Auth\Notifications\VerifyEmail;
1012
use NotFound\Framework\Models\Lang;
13+
use NotFound\Framework\Services\CmsExchange\ExchangeConsoleService;
14+
use NotFound\Framework\Services\Indexer\IndexBuilderService;
1115
use NotFound\Framework\View\Components\ConfigurationCheck;
1216
use NotFound\Framework\View\Components\Forms\Form;
1317

@@ -17,7 +21,21 @@ public function boot(): void
1721
{
1822
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
1923
$this->loadRoutesFrom(__DIR__.'/../routes/api.php');
20-
$this->loadRoutesFrom(__DIR__.'/../routes/console.php');
24+
$this->commands([
25+
Artisan::command('siteboss:index-site {--debug : Display debug messages} {--fresh : Empty local search table}', function ($debug, $fresh) {
26+
$indexer = new IndexBuilderService($debug, $fresh);
27+
$indexer->run();
28+
29+
return Command::SUCCESS;
30+
})->purpose('Index site for local search'),
31+
32+
Artisan::command('siteboss:cms-import {--debug : Display debug messages} {--dry : Dry Run}', function ($debug, $dry) {
33+
$exchanger = new ExchangeConsoleService($debug, $dry);
34+
$exchanger->import();
35+
36+
return Command::SUCCESS;
37+
})->purpose('Import CMS changes to the database'),
38+
]);
2139
$this->loadViewsFrom(__DIR__.'/../resources/views', 'siteboss');
2240
$this->loadTranslationsFrom(__DIR__.'/../lang', 'siteboss');
2341

0 commit comments

Comments
 (0)