File: D:/HostingSpaces/SBogers68/ouddorp-duin.nl/workbench/komma/kms/src/commands.php
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
use Komma\Kms\Products\Models\Product;
use Komma\Kms\Products\Models\ShopProduct;
use Symfony\Component\Console\Output\BufferedOutput;
Route::get('kms/migrate', function()
{
$output = new BufferedOutput;
Artisan::call('migrate', [
'--bench' => 'komma/kms',
'--force' => true
], $output);
return "Output: " . $output->fetch();
});
Route::get('kms/roll-back', function()
{
$output = new BufferedOutput;
Artisan::call('migrate:rollback', [
'--force' => true
], $output);
return "Output: " . $output->fetch();
});
Route::get('kms/seed/all', function()
{
$output = new BufferedOutput;
Artisan::call('db:seed', [
'--class' => '\Komma\Kms\Seeds\SeedAll',
'--force' => true
], $output);
return "Output: " . $output->fetch();
});
Route::get('kms/updateSearchIndex', 'Komma\Kms\Core\SearchIndex\SearchIndexController@reindexAll');
Route::get('kms/test', function(){
$categoryRepository = \App::make('KommaApp\Shop\Categories\CategoryRepository');
$categoryRepository->getAllActiveCategories();
});