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


PHP Blueprint::boolean方法代码示例

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


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

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

示例2: addConfirmationColumns

 /**
  * Add confirmation columns.
  *
  * @param  \Illuminate\Database\Schema\Blueprint  $table
  */
 private function addConfirmationColumns(Blueprint $table)
 {
     if (UserConfirmator::isEnabled()) {
         $table->boolean('is_confirmed')->default(0);
         $table->string('confirmation_code', UserConfirmator::getLength())->nullable();
         $table->timestamp('confirmed_at')->nullable();
     }
 }
开发者ID:ARCANEDEV,项目名称:LaravelAuth,代码行数:13,代码来源:2015_01_01_000001_create_auth_users_table.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: 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

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

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

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

示例8: create

 protected function create(Blueprint $table)
 {
     $table->create();
     $table->increments('id');
     $table->integer('group_id')->unsigned()->default(3);
     $table->string('username', 200)->default('');
     $table->string('password', 60)->default('');
     $table->string('email', 80)->default('');
     $table->string('title', 50)->nullable();
     $table->string('realname', 40)->nullable();
     $table->string('url', 100)->nullable();
     $table->string('location', 30)->nullable();
     $table->text('signature')->nullable();
     $table->integer('disp_topics')->unsigned()->nullable();
     $table->integer('disp_posts')->unsigned()->nullable();
     $table->integer('email_setting')->unsigned()->default(1);
     $table->boolean('notify_with_post')->default(false);
     $table->boolean('auto_notify')->default(false);
     $table->boolean('show_smilies')->default(true);
     $table->boolean('show_img')->default(true);
     $table->boolean('show_img_sig')->default(true);
     $table->boolean('show_avatars')->default(true);
     $table->boolean('show_sig')->default(true);
     $table->float('timezone')->default(0);
     $table->boolean('dst')->default(false);
     $table->integer('time_format')->unsigned()->default(0);
     $table->integer('date_format')->unsigned()->default(0);
     $table->string('language', 25)->default('');
     $table->string('style', 25)->default('');
     $table->integer('num_posts')->unsigned()->default(0);
     $table->integer('last_post')->unsigned()->nullable();
     $table->integer('last_search')->unsigned()->nullable();
     $table->integer('last_email_sent')->unsigned()->nullable();
     $table->integer('last_report_sent')->unsigned()->nullable();
     $table->integer('registered')->unsigned()->default(0);
     $table->string('registration_ip', 35)->default('0.0.0.0');
     $table->integer('last_visit')->unsigned()->default(0);
     $table->string('admin_note', 30)->nullable();
     $table->string('activate_string', 80)->nullable();
     $table->string('activate_key', 8)->nullable();
     $table->string('remember_token')->nullable();
     $table->unique('username');
     $table->index('registered');
 }
开发者ID:fluxbb,项目名称:core,代码行数:44,代码来源:Users.php

示例9: ifNoUsersTable

 private function ifNoUsersTable(Blueprint $table)
 {
     $table->increments('id');
     $table->string('first_name');
     $table->string('last_name');
     $table->string('email')->unique();
     $table->string('avatar');
     $table->string('provider');
     $table->string('provider_id')->unique();
     $table->longText('provider_token');
     $table->string('password', 60)->nullable();
     $table->boolean('verified')->default(false);
     $table->string('gender')->nullable();
     $table->string('link');
     $table->rememberToken();
     $table->timestamps();
 }
开发者ID:jayaregalinada,项目名称:common,代码行数:17,代码来源:common_create_users_table.php

示例10: testAddingBoolean

 public function testAddingBoolean()
 {
     $blueprint = new Blueprint('users');
     $blueprint->boolean('foo');
     $statements = $blueprint->toSql($this->getGrammar());
     $this->assertEquals(1, count($statements));
     $this->assertEquals('alter table "users" add "foo" tinyint not null', $statements[0]);
 }
开发者ID:hochanh,项目名称:Bootsoft-Bowling,代码行数:8,代码来源:SqlServerSchemaGrammarTest.php

示例11: testAddingBoolean

 public function testAddingBoolean()
 {
     $blueprint = new Blueprint('users');
     $blueprint->boolean('foo');
     $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar());
     $this->assertEquals(1, count($statements));
     $this->assertEquals('alter table users add ( foo char(1) not null )', $statements[0]);
 }
开发者ID:mickael83,项目名称:Laravel-OracleDB,代码行数:8,代码来源:OracleDBSchemaGrammarTest.php

示例12: setDatabaseFieldType

 /**
  * @param Blueprint $table
  *
  * @return \Illuminate\Support\Fluent
  */
 public function setDatabaseFieldType(Blueprint $table)
 {
     return $table->boolean($this->getDBKey());
 }
开发者ID:KodiComponents,项目名称:module-datasource,代码行数:9,代码来源:Boolean.php


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