SQL to Laravel Model
Generate Eloquent model classes from SQL CREATE TABLE statements — with fillable, casts, and relationships.
About Laravel Eloquent Models
Eloquent is Laravel's ORM (Object-Relational Mapper). Each database table has a corresponding Model class that is used to interact with that table. The $fillable property lists columns that can be mass-assigned. The $casts property specifies automatic type casting — booleans, dates, JSON columns. This generator creates a complete Eloquent model from your SQL schema, saving significant boilerplate writing.
FAQ
Should I use $fillable or $guarded?
$fillable (whitelist) explicitly lists allowed columns — more secure and explicit. $guarded (blacklist) lists columns NOT allowed — faster to write but less safe. Laravel convention is $fillable for security. Use $guarded = [] to allow all columns only in internal seed scripts or trusted admin tools, never in public-facing forms.