Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 236 | Revision 238 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;

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

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Converts the old webanOS-DB to laravel';

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $sql = '
            SELECT 
                *
            FROM
                directory
            WHERE
                father>=-1
        ';
        $dirs = DB::connection('old')->select($sql);
        foreach ($dirs as $row) {
            var_dump($row);
        }
    }
}