updated module compatibility
This commit is contained in:
@ -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.
|
||||
|
@ -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 [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user