Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1623 | Revision 1627 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
151 lars 1
<?php
2
 
1623 lars 3
    namespace App\Console\Commands;
151 lars 4
 
1623 lars 5
    use Illuminate\Console\Command;
6
    use App\Models\PriceAgency;
151 lars 7
 
1623 lars 8
    class dump extends Command
9
    {
10
        /**
11
         * The name and signature of the console command.
12
         *
13
         * @var string
14
         */
15
        protected $signature = 'command:dump';
151 lars 16
 
1623 lars 17
        /**
18
         * The console command description.
19
         *
20
         * @var string
21
         */
22
        protected $description = 'Erstellt CSV-Dateien für Preisagenturen';
151 lars 23
 
1623 lars 24
        /**
25
         * Execute the console command.
26
         *
27
         * @return int
28
         */
29
        public function handle(): int
30
        {
1626 lars 31
            $agencies = PriceAgency::where( 'shop_id', $GLOBALS["INI"]["shops_ID"] )->get();
1623 lars 32
            foreach ( $agencies as $agency )
33
            {
34
                $this->info( $agency["name"] );
35
            }
36
        }
151 lars 37
    }