Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1626 | Revision 1629 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php

    namespace App\Console\Commands;

    use Illuminate\Console\Command;
    use App\Models\PriceAgency;

    class dump extends Command
    {
        /**
         * The name and signature of the console command.
         *
         * @var string
         */
        protected $signature = 'command:dump';

        /**
         * The console command description.
         *
         * @var string
         */
        protected $description = 'Erstellt CSV-Dateien für Preisagenturen';

        /**
         * Execute the console command.
         *
         * @return int
         */
        public function handle(): int
        {
            $agencies = PriceAgency::where( 'shop_id', $GLOBALS["INI"]["shops_ID"] )->get();
            foreach ( $agencies as $agency )
            {
                $this->info( $agency["name"] );
            }
            return count( $agencies );
        }
    }