Overview

Namespaces

  • Composer
    • Autoload
  • Illuminate
    • Support
      • Contracts
      • Facades
  • Laravella
    • Crud
      • Exceptions
      • Facades
  • None
  • PHP

Classes

  • ComposerAutoloaderInit0812ead62c33200f1cfc491b452f7c6a
  • CreateActionsTable
  • CreateAssetsTable
  • CreateAuditTable
  • CreateDisplayTypesTable
  • CreateEventsTable
  • CreateFieldsTable
  • CreateKeyFieldsTable
  • CreateKeysTable
  • CreateKeyTypesTable
  • CreateLogsTable
  • CreateMenuPermissionsTable
  • CreateMenusTable
  • CreateObjectEventsTable
  • CreateObjectsTable
  • CreateOptionsTable
  • CreateOptionTypesTable
  • CreatePageAssetsTable
  • CreatePagesTable
  • CreateSeveritiesTable
  • CreateTablesTable
  • CreateUserGroupPermissionsTable
  • CreateUsergroupsTable
  • CreateUserPermissionsTable
  • CreateViewsTable
  • CreateWidgetTypesTable
  • DbApiController
  • DbController
  • Domain
  • field
  • foreignKey
  • Model
  • PageController
  • primaryKey
  • Record
  • Relation
  • Table
  • xxxxAddMcollectionMediaTable
  • xxxxCreateUsersTable

Functions

  • action
  • app
  • app_path
  • array_add
  • array_build
  • array_divide
  • array_dot
  • array_except
  • array_fetch
  • array_first
  • array_flatten
  • array_forget
  • array_get
  • array_only
  • array_pluck
  • array_pull
  • array_set
  • array_sort
  • asset
  • base_path
  • camel_case
  • class_basename
  • csrf_token
  • dd
  • e
  • ends_with
  • head
  • last
  • link_to
  • link_to_action
  • link_to_asset
  • link_to_route
  • object_get
  • public_path
  • route
  • secure_asset
  • secure_url
  • snake_case
  • starts_with
  • storage_path
  • str_contains
  • str_finish
  • str_is
  • str_plural
  • str_random
  • str_singular
  • studly_case
  • trans
  • trans_choice
  • url
  • value
  • with
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: use Illuminate\Database\Schema\Blueprint;
 4: use Illuminate\Database\Migrations\Migration;
 5: 
 6: class CreateFieldsTable extends Migration {
 7: 
 8:     /**
 9:      * Run the migrations.
10:      *
11:      * @access   public
12:      * @return   void
13:      */
14:     public function up()
15:     {
16:         if (!Schema::hasTable('_db_fields'))
17:         {
18: 
19:             Schema::create('_db_fields', function ($table)
20:                     {
21:                         $table->increments('id')->unique();
22:                         $table->string('name', 100);                        // the field's name
23:                         $table->string('fullname', 100);                    // the field's fully qualified name table.field
24:                         $table->string('label', 100);                       // the label
25:                         $table->integer('display_type_id')->nullable();     // how the field will be displayed in lists/selects (see _db_display_types table)
26:                         $table->integer('searchable')->nullable();          // 1 if the field is display in a search form, else 0
27:                         $table->integer('display_order')->nullable();       // the order in which field will be displayed in lists/selects
28:                         $table->string('type', 100)->nullable();            // datatype
29:                         $table->integer('length')->nullable();              // datalength
30:                         $table->integer('width')->nullable();               // display width of the field in pixels
31:                         $table->integer('widget_type_id')->nullable();      // an html widget (see _db_widget_types table)
32:                         $table->string('null', 3)->nullable();              // nullable
33:                         $table->string('key', 50)->nullable();              // type of key
34:                         $table->string('default', 100)->nullable();         // default value
35:                         $table->string('extra', 100)->nullable();
36:                         $table->string('href', 100)->nullable();                        //hyperlink this field with the href link
37:                         $table->integer('table_id')->unsigned();                               // links to _db_tables.id
38: //                        $table->integer('pk_field_id')->unsigned()->nullable();                // links to _db_fields.id (the id of the primary key)
39: //                        $table->integer('pk_display_field_id')->unsigned()->nullable();        // links to _db_fields.id (the id of a field in the primary table that will be used as a description of the primary key id)
40:                         $table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
41:                         $table->timestamp('updated_at')->default('0000-00-00 00:00:00');
42: 
43:                         /*
44:                           $table->unique(array('table_id', 'name'));
45:                           $table->foreign('table_id')->references('id')->on('_db_tables')->onDelete('cascade');
46:                          */
47:                     });
48:         }
49:     }
50: 
51:     /**
52:      * Reverse the migrations.
53:      *
54:      * @access   public
55:      * @return   void
56:      */
57:     public function down()
58:     {
59:         Schema::dropIfExists('_db_fields');
60:     }
61: 
62: }
63: 
crud API documentation generated by ApiGen 2.8.0