iberflow / laravel-model-generator

Laravel 5 model generator for an existing schema
264 stars 76 forks source link

Use of `--dir /` causes extra character in Model file. #43

Open behemphi opened 7 years ago

behemphi commented 7 years ago

PHP: 7.1.4 Laravel: 5.1.46 LTS

Running this command: php artisan make:models --tables group_practice_type -vvv --dir /

Outputs the file app/GroupPracticeType.php thus:

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

/**
 * Class \GroupPracticeType
 */
class \GroupPracticeType extends Model
{
    protected $table = 'group_practice_type';

    protected $primaryKey = 'group_practice_type_id';

    public $timestamps = true;

    protected $fillable = [
        'group_practice_nm',
        'group_practice_cd',
        'group_practice_dsc',
        'order_num'
    ];

    protected $guarded = [];

}

Note the backslash on line 10 preceding the class name.