@extends('backend.layouts.app') @section('title', 'Model Generator') @push('styles') @endpush @section('content')

Model Generator

Generate a Laravel Eloquent model from an existing database table. Choose between PHP Attributes or Class Properties style.

Back to ArtisanGen

How it works

  • Select an existing database table. The generator reads its schema (columns, types, primary key).
  • The Model Name is auto-filled from the table name, but you can change it.
  • Click Preview to see the generated PHP code before creating the file.
  • Click Generate to create the file. The save location follows the Namespace you enter (e.g. app/Models/Backend/{ModelName}.php).

Configure Model

Parent folder only. Do not include the model name. Use PHP namespace separator \. Examples: app\Models, app\Models\Backend, app\Models\Backend\Catalog

File path:

@push('scripts') @endpush @endsection