In this article, I will show you how to generate an Eloquent Model from a database table.
Step Add Eloquent Model Generator to your project: Step Register GeneratorServiceProvider: If you are using Laravel version 5.5 or higher this step can be omitted since this project supports Package Discovery feature. Step Configure your database connection.
Use table-name option to specify another table name: In this case generated model will contain protected $table = 'user' property.
Add next lines at your config/eloquent_model_generator.php: Table user: Command: Result: If you use this package code generator automatically generates doc for your models.