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


PHP Blueprint::string方法代碼示例

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


在下文中一共展示了Blueprint::string方法的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: 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

示例3: _schema_locationTrait

 public static function _schema_locationTrait(Blueprint $table)
 {
     $table->string('longitude')->nullable();
     $table->string('latitude')->nullable();
     $table->string('location_precision')->nullable();
     $table->string('location_title')->nullable();
     return $table;
 }
開發者ID:xjtuwangke,項目名稱:laravel-bundles,代碼行數:8,代碼來源:LocationTrait.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: _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

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

示例7: _schema_roles

 public static function _schema_roles(\Illuminate\Database\Schema\Blueprint $table)
 {
     $table->integer('parent_id');
     $table->string('name')->unique();
     $table->longText('permissions');
     $table->string('title');
     $table->text('desc')->nullable();
     return $table;
 }
開發者ID:xjtuwangke,項目名稱:laravel-models,代碼行數:9,代碼來源:RoleModel.php

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

示例9: _schema_UserModel

 public static function _schema_UserModel(Blueprint $table)
 {
     $table->string('email')->nullable()->label('郵箱');
     $table->string('mobile')->nullable()->label('手機號碼');
     $table->string('username')->nullable()->label('姓名');
     $table->string('nickname')->nullable()->label('昵稱');
     $table->enum('gender', ['未填' => '未填', '男' => '男', '女' => '女'])->default('未填')->label('性別');
     $table->string('avatar')->nullable()->label('頭像');
     $table->date('birthday')->nullable()->label('生日');
     return $table;
 }
開發者ID:xjtuwangke,項目名稱:laravel-bundles,代碼行數:11,代碼來源:UserModelBase.php

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

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

示例12: _schema_LoginableTrait

 /**
  * @param Blueprint $table
  * @return Blueprint
  */
 public static function _schema_LoginableTrait(Blueprint $table)
 {
     $table->string('password')->nullable();
     $table->rememberToken('remember_token');
     $table->dateTime('last_login')->nullable();
     $table->string('last_ip')->nullable();
     $table->integer('fails')->default(0);
     $table->enum('is_banned', [0, 1])->default(0);
     $table->text('ban_reason')->nullable();
     $table->enum('locked_screen', [0, 1])->default(0);
     return $table;
 }
開發者ID:xjtuwangke,項目名稱:laravel-bundles,代碼行數:16,代碼來源:LoginableTrait.php

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

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

示例15: create

 protected function create(Blueprint $table)
 {
     $table->create();
     $table->string('conf_name', 255)->default('');
     $table->text('conf_value')->nullable();
     $table->primary('conf_name');
 }
開發者ID:fluxbb,項目名稱:core,代碼行數:7,代碼來源:Config.php


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