當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Blueprint::integer方法代碼示例

本文整理匯總了PHP中Illuminate\Database\Schema\Blueprint::integer方法的典型用法代碼示例。如果您正苦於以下問題:PHP Blueprint::integer方法的具體用法?PHP Blueprint::integer怎麽用?PHP Blueprint::integer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Database\Schema\Blueprint的用法示例。


在下文中一共展示了Blueprint::integer方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: create

 protected function create(Blueprint $table)
 {
     $table->create();
     $table->integer('user_id')->unsigned();
     $table->integer('topic_id')->unsigned();
     $table->primary(array('user_id', 'topic_id'));
 }
開發者ID:fluxbb,項目名稱:core,代碼行數:7,代碼來源:TopicSubscriptions.php

示例2: create

 protected function create(Blueprint $table)
 {
     $table->create();
     $table->integer('group_id')->unsigned();
     $table->integer('forum_id')->unsigned();
     $table->boolean('read_forum')->default(true);
     $table->boolean('post_replies')->default(true);
     $table->boolean('post_topics')->default(true);
     $table->primary(array('group_id', 'forum_id'));
 }
開發者ID:fluxbb,項目名稱:core,代碼行數:10,代碼來源:ForumPerms.php

示例3: _schema_imageModel

 public static function _schema_imageModel(Blueprint $table)
 {
     $table->string('image');
     $table->string('url');
     $table->unsignedInteger('order')->default(0);
     $table->string('type')->default('default');
     $table->integer('width');
     $table->integer('height');
     $table->morphs('imageable');
     return $table;
 }
開發者ID:xjtuwangke,項目名稱:laravel-bundles,代碼行數:11,代碼來源:ImageModel.php

示例4: create

 protected function create(Blueprint $table)
 {
     $table->create();
     $table->string('id', 40);
     $table->integer('user_id')->unsigned()->default(1);
     $table->integer('created')->unsigned()->default(0);
     $table->integer('last_activity')->unsigned()->default(0);
     $table->string('last_ip', 200)->default('0.0.0.0');
     $table->text('payload');
     $table->primary('id');
     $table->index('user_id');
 }
開發者ID:fluxbb,項目名稱:core,代碼行數:12,代碼來源:Sessions.php

示例5: 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

示例6: 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

示例7: _schema_chinaArea

 /**
  * @param Blueprint $table
  * @return Blueprint
  */
 public static function _schema_chinaArea(Blueprint $table)
 {
     $table->integer('areano');
     $table->integer('parentno');
     $table->string('name');
     $table->string('province')->nullable();
     $table->string('city')->nuallable();
     $table->string('distinct')->nullable();
     $table->enum('flag', ['國家', '省', '市', '區/縣']);
     $table->integer('sort')->default(99);
     $table->integer('zipcode')->default(0);
     return $table;
 }
開發者ID:xjtuwangke,項目名稱:laravel-bundles,代碼行數:17,代碼來源:China.php

示例8: _schema_usermodel

 public static function _schema_usermodel(\Illuminate\Database\Schema\Blueprint $table)
 {
     $table->string('username', 100);
     $table->string('nickname', 30)->unique();
     $table->string('email', 100);
     $table->string('mobile', 20);
     $table->integer('exp')->default(0);
     $table->integer('points')->default(0);
     $table->date('birthdate')->nullable();
     $table->enum('gender', ['男', '女', '保密'])->default('保密');
     $table->string('password', 100);
     $table->string('remember_token', 100);
     $table->timestamp('last_login');
     return $table;
 }
開發者ID:xjtuwangke,項目名稱:laravel-models,代碼行數:15,代碼來源:UserModel.php

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: _schema_ResetPasswordTokens

 /**
  * @param Blueprint $table
  * @return Blueprint
  */
 public static function _schema_ResetPasswordTokens(Blueprint $table)
 {
     $table->string('key')->index();
     $table->string('token');
     $table->integer('user_id')->index();
     $table->dateTime('expires_at');
     return $table;
 }
開發者ID:xjtuwangke,項目名稱:laravel-bundles,代碼行數:12,代碼來源:ResetPasswordTokens.php

示例15: create

 protected function create(Blueprint $table)
 {
     $table->create();
     $table->string('slug', 100)->primary();
     $table->string('name');
     $table->integer('position')->default(0);
     $table->boolean('conversations_enabled')->default(true);
     $table->timestamps();
 }
開發者ID:fluxbb,項目名稱:core,代碼行數:9,代碼來源:Categories.php


注:本文中的Illuminate\Database\Schema\Blueprint::integer方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。