An admin model is a regular Laravel Eloquent model from the MVC architecture. The difference is that an admin model carries parameters and settings from which CrudAdmin generates the database, the forms and the validation.
For the bigger picture of how the generation works, read How it works.

What you get

  1. The whole database and the administration interface are generated from the admin model settings.
  2. Relations between models are mapped automatically. You no longer write relation methods — calling a method named after the related model binds the relation, for example $article->gallery() or $article->gallery.
  3. $fillable and $casts are filled automatically from the defined fields.
  4. And more.

Creating an admin model

Admin models are created with php artisan.
The command creates app/Models/Article.php, or app/Article.php when the Models directory does not exist.
app/Models/Article.php
A name starting with the plural of an existing admin model sets the parent: admin:model ArticlesComment generates protected $belongsToModel = Article::class;. A name ending with Gallery generates a multirows image field. Then create the table with php artisan admin:migrate, see Migrations.

Next steps

Model parameters

Overview of every parameter that shapes the model in the administration.

Fields

Field types, their parameters, groups and tabs.

Listing and search

Order, filter and export the records of the table.

Permissions

Restrict creating, editing and deleting records.