当前位置: 首页>>代码示例>>PHP>>正文


PHP Blueprint::increments方法代码示例

本文整理汇总了PHP中Illuminate\Database\Schema\Blueprint::increments方法的典型用法代码示例。如果您正苦于以下问题:PHP Blueprint::increments方法的具体用法?PHP Blueprint::increments怎么用?PHP Blueprint::increments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Database\Schema\Blueprint的用法示例。


在下文中一共展示了Blueprint::increments方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: activate

 /**
  * Activates the table.
  *
  * @param \Illuminate\Database\Schema\Blueprint $table
  */
 public function activate(Blueprint $table)
 {
     $table->increments('id');
     $table->string('title');
     $table->string('slug');
     $table->enum('type', ['PROFILE', 'SHARE'])->default('PROFILE');
 }
开发者ID:PrafullaKumarSahu,项目名称:wordpress-socializr,代码行数:12,代码来源:SetsTable.php

示例2: create

 protected function create(Blueprint $table)
 {
     $table->create();
     $table->increments('id');
     $table->string('title', 50)->default('');
     $table->integer('parent_group_id')->unsigned()->nullable();
 }
开发者ID:fluxbb,项目名称:core,代码行数:7,代码来源:Groups.php

示例3: activate

 /**
  * Activates the table.
  *
  * @param \Illuminate\Database\Schema\Blueprint $table
  */
 public function activate(Blueprint $table)
 {
     $table->increments('id');
     $table->string('title');
     $table->string('slug');
     $table->string('url');
     $table->boolean('default_set');
 }
开发者ID:PrafullaKumarSahu,项目名称:wordpress-socializr,代码行数:13,代码来源:SharesTable.php

示例4: activate

 /**
  * Activates the table.
  *
  * @param \Illuminate\Database\Schema\Blueprint $table
  */
 public function activate(Blueprint $table)
 {
     $table->increments('id');
     $table->string('title');
     $table->string('handle');
     $table->string('url');
     $table->integer('set_id');
 }
开发者ID:PrafullaKumarSahu,项目名称:wordpress-socializr,代码行数:13,代码来源:ProfilesTable.php

示例5: create

 /**
  * Create the table schema.
  *
  * @param Blueprint $table
  *
  * @return mixed
  */
 protected function create(Blueprint $table)
 {
     $table->increments('id');
     $table->unsignedInteger('job_id');
     $table->string('name');
     $table->unique(['job_id', 'name']);
     $table->timestamps();
 }
开发者ID:MarkVaughn,项目名称:illuminated,代码行数:15,代码来源:CreateJobTagsTable.php

示例6: create

 protected function create(Blueprint $table)
 {
     $table->create();
     $table->increments('id');
     $table->integer('group_id')->unsigned();
     $table->string('name', 50);
     $table->boolean('value');
 }
开发者ID:fluxbb,项目名称:core,代码行数:8,代码来源:GroupPermissions.php

示例7: create

 /**
  * Create the table schema.
  *
  * @param Blueprint $table
  *
  * @return mixed
  */
 protected function create(Blueprint $table)
 {
     $table->increments('id');
     $table->text('public_id');
     $table->text('secret_key');
     $table->string('type');
     $table->text('data');
     $table->timestamps();
 }
开发者ID:MarkVaughn,项目名称:illuminated,代码行数:16,代码来源:CreateKeyPairTable.php

示例8: table

 /**
  * 
  * @param sting $table
  * @return $this
  */
 public function table($table)
 {
     $this->table = $table;
     $this->blueprint = new Blueprint($table);
     if (!Schema::hasTable($table)) {
         $this->blueprint->create();
         $this->blueprint->increments('id');
     }
     return $this;
 }
开发者ID:boyhagemann,项目名称:framework,代码行数:15,代码来源:ModelBuilder.php

示例9: buildDynamicTable

 protected function buildDynamicTable(Blueprint $table)
 {
     $reference_column = $this->getDynamicType() . '_id';
     $reference_table = $this->getDynamicType() . 's';
     $reference_index = 'FK_' . $this->getDynamicTableName() . '_' . $reference_column . '_' . $reference_table;
     $table->increments('id');
     $table->integer($reference_column)->unsigned()->nullable();
     $table->foreign($reference_column, $reference_index)->references('id')->on($reference_table)->onUpdate('CASCADE')->onDelete('SET NULL');
     $table->timestamps();
 }
开发者ID:sodacms,项目名称:sodacms,代码行数:10,代码来源:AbstractDynamicType.php

示例10: describeSchema

 /**
  * Give me the tools and I will tell you what my schema is...
  *
  * @param Blueprint $table The blueprint for the database table.
  * @return Blueprint The designed database table schema.
  */
 public static function describeSchema(Blueprint $table)
 {
     $table->increments('id');
     $table->string('uuid', 36);
     $table->integer('playhead')->unsigned();
     $table->text('metadata');
     $table->text('payload');
     $table->string('recorded_on', 32);
     $table->text('type');
     $table->unique(['uuid', 'playhead']);
     return $table;
 }
开发者ID:cminor-io,项目名称:laravel-on-broadway-eventstore,代码行数:18,代码来源:LaravelStoreSchema.php

示例11: buildDynamicTable

 protected function buildDynamicTable(Blueprint $table)
 {
     $block_index = 'FK_' . $this->getDynamicTableName() . '_block_id_blocks';
     $page_index = 'FK_' . $this->getDynamicTableName() . '_page_id_pages';
     $table->increments('id');
     $table->integer('block_id')->unsigned()->nullable();
     $table->integer('page_id')->unsigned()->nullable();
     $table->integer('is_shared')->unsigned()->nullable();
     $table->foreign('block_id', $block_index)->references('id')->on('blocks')->onUpdate('CASCADE')->onDelete('SET NULL');
     $table->foreign('page_id', $page_index)->references('id')->on('pages')->onUpdate('CASCADE')->onDelete('SET NULL');
     $table->timestamps();
 }
开发者ID:sodacms,项目名称:sodacms,代码行数:12,代码来源:BlockType.php

示例12: getBlueprint

 /**
  * @return Blueprint|null
  */
 public function getBlueprint()
 {
     if ($this->hasPivotTable()) {
         $left = $this->buildLeftColumnName();
         $right = $this->getColumn();
         $table = $this->getTable();
         $blueprint = new Blueprint($table);
         $blueprint->increments('id');
         $blueprint->integer($left);
         $blueprint->integer($right);
         return $blueprint;
     }
 }
开发者ID:boyhagemann,项目名称:model,代码行数:16,代码来源:Relation.php

示例13: create

 /**
  * Create the table schema.
  *
  * @param Blueprint $table
  *
  * @return mixed
  */
 protected function create(Blueprint $table)
 {
     $table->increments('id');
     $table->string('task');
     $table->text('data')->nullable();
     $table->string('state')->default(JobState::IDLE);
     $table->text('message')->nullable();
     $table->boolean('schedulable')->default(false);
     $table->integer('attempts')->default(0);
     $table->integer('retries')->default(0);
     $table->timestamp('started_at')->nullable();
     $table->timestamp('completed_at')->nullable();
     $table->timestamp('expires_at')->nullable();
     $table->timestamp('run_at')->nullable();
     $table->timestamps();
 }
开发者ID:MarkVaughn,项目名称:illuminated,代码行数:23,代码来源:CreateJobsTable.php

示例14: create

 protected function create(Blueprint $table)
 {
     $table->create();
     $table->increments('id');
     $table->string('category_slug', 100)->nullable()->index();
     $table->string('title');
     $table->string('poster', 200)->default('');
     $table->integer('posted')->unsigned()->default(0);
     $table->integer('first_post_id')->unsigned()->default(0);
     $table->integer('last_post')->unsigned()->default(0);
     $table->integer('last_post_id')->unsigned()->default(0);
     $table->string('last_poster', 200)->nullable();
     $table->integer('num_views')->unsigned()->default(0);
     $table->integer('num_replies')->unsigned()->default(0);
     $table->timestamps();
 }
开发者ID:fluxbb,项目名称:core,代码行数:16,代码来源:Conversations.php

示例15: create

 protected function create(Blueprint $table)
 {
     $table->create();
     $table->increments('id');
     $table->string('poster', 200)->default('');
     $table->integer('poster_id')->unsigned()->default(1);
     $table->string('poster_ip', 39)->nullable();
     $table->text('message')->nullable();
     $table->boolean('hide_smilies')->default(false);
     $table->integer('posted')->unsigned()->default(0);
     $table->integer('edited')->unsigned()->nullable();
     $table->string('edited_by', 200)->nullable();
     $table->integer('conversation_id')->unsigned();
     $table->index('conversation_id');
     $table->index(['poster_id', 'conversation_id']);
 }
开发者ID:fluxbb,项目名称:core,代码行数:16,代码来源:Posts.php


注:本文中的Illuminate\Database\Schema\Blueprint::increments方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。