chandra
  • Introduction
  • Laravel 8
  • Laravel 5.6
  • Laravel 5.4
  • Laravel 5.2, 5.3
  • Laravel 5.1 Version
    • Installation
      • database & Environment setup
      • Directory Permissions
      • Mail Setup
      • Copying Chandra files
      • Install Chandra
    • Fresh Installation
  • Laravel 5 Version
    • Installation
      • Database & Environment setup
      • Permissions
      • Mail Setup
      • Copying Chandra Files
      • Install Chandra
  • Changelog
  • CRUD
    • usage
  • Recaptcha
Powered by GitBook
On this page
  • available field types
  • other field types
  • planned field types

Was this helpful?

  1. CRUD

usage

you can generate CRUD using below command

for example: to generate books model with title, author, description fields

please run

php artisan crud:gen book --fields="title:string,author:string,description:text"

If you want just model and controller then run below command

php artisan crud:gen book

when you don't pass fields, it will just create model and controller

available field types

  • string - this will create a varchar in database, input field for views

  • text - this will create a text in daabase and textarea for views

  • password - this will create varchar in database, password field for views

  • email - this will create varchar in database, email field for views

all others will be treated as varchar in database and respected field type will be created for views

ex: if you pass 'radio' then in views, input type="radio" will be created

other field types

we will be updating CRUD continously and you can expect other field types in coming days

planned field types

  • radio

  • checkbox

  • file

  • select2

  • icheck

  • textarea (summernote)

PreviousCRUDNextRecaptcha

Last updated 5 years ago

Was this helpful?