updated module compatibility

This commit is contained in:
Denis Duliçi
2020-10-17 14:53:24 +03:00
parent 86de28d87d
commit 77e4109b03
5 changed files with 93 additions and 59 deletions

View File

@ -9,11 +9,11 @@ use Symfony\Component\Console\Input\InputArgument;
class $CLASS$ extends Command
{
/**
* The console command name.
* The name and signature of the console command.
*
* @var string
*/
protected $name = '$COMMAND_NAME$';
protected $signature = '$COMMAND_NAME$';
/**
* The console command description.

View File

@ -1,9 +1,28 @@
<?php
use Faker\Generator as Faker;
namespace $NAMESPACE$;
$factory->define(Model::class, function (Faker $faker) {
return [
//
];
});
use Illuminate\Database\Eloquent\Factories\Factory;
use Faker\Generator as Faker;
class $NAME$ extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \$MODEL_NAMESPACE$\$NAME$::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
//
];
}
}

View File

@ -3,8 +3,21 @@
namespace $NAMESPACE$;
use App\Abstracts\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class $CLASS$ extends Model
{
use HasFactory;
protected $fillable = $FILLABLE$;
/**
* Create a new factory instance for the model.
*
* @return \Illuminate\Database\Eloquent\Factories\Factory
*/
protected static function newFactory()
{
return \$FACTORY_NAMESPACE$\$NAME$::new();
}
}