Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision Autor Zeilennr. Zeile
233 lars 1
<?php
2
 
3
namespace App\Console\Commands;
4
 
5
use Illuminate\Console\Command;
236 lars 6
use Illuminate\Support\Facades\DB;
233 lars 7
 
8
class convertDB extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
235 lars 15
    protected $signature = 'command:convertDB';
233 lars 16
 
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
235 lars 22
    protected $description = 'Converts the old webanOS-DB to laravel';
233 lars 23
 
24
    /**
25
     * Execute the console command.
26
     *
27
     * @return int
28
     */
29
    public function handle()
30
    {
234 lars 31
        $sql = '
32
            SELECT
33
                *
34
            FROM
35
                directory
36
            WHERE
37
                father>=-1
38
        ';
237 lars 39
        $dirs = DB::connection('old')->select($sql);
40
        foreach ($dirs as $row) {
234 lars 41
            var_dump($row);
42
        }
233 lars 43
    }
44
}