diff --git a/app/Console/Commands/CreateAISummary.php b/app/Console/Commands/CreateAISummary.php index e77c2620..8b23e7db 100644 --- a/app/Console/Commands/CreateAISummary.php +++ b/app/Console/Commands/CreateAISummary.php @@ -4,7 +4,6 @@ use App\CrimeEvent; use Illuminate\Console\Command; -use MO; class CreateAISummary extends Command { /** diff --git a/app/Console/Commands/ListEvents.php b/app/Console/Commands/ListEvents.php new file mode 100644 index 00000000..74986d01 --- /dev/null +++ b/app/Console/Commands/ListEvents.php @@ -0,0 +1,36 @@ +line('Senaste händelserna:'); + + $events = CrimeEvent::select(['parsed_date', 'id', 'title'])->limit(10)->orderByDesc('parsed_date')->get(); + + $this->table(['Parsed date', 'ID', 'Title'], $events); + return Command::SUCCESS; + } +}