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


PHP Builder::table方法代碼示例

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


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

示例1: down

 /**
  * Undo the migration
  */
 public function down()
 {
     //Remove Field
     $this->schema->table('user_details', function ($table) {
         $table->dropColumn('profile_picture');
     });
 }
開發者ID:AshniSukhoo,項目名稱:UOM_connect,代碼行數:10,代碼來源:20160128181212_AddProfilePictureFieldToUserDetailsTable.php

示例2: down

 /**
  * Undo the migration
  */
 public function down()
 {
     $this->schema->table('users_basic_info', function ($table) {
         $table->dropForeign('users_basic_info_user_id_foreign');
     });
     //Drop table
     $this->schema->dropIfExists('users_basic_info');
 }
開發者ID:AshniSukhoo,項目名稱:UOM_connect,代碼行數:11,代碼來源:20160110122143_CreateBasicInfoTable.php

示例3: down

 /**
  * Undo the migration
  */
 public function down()
 {
     //Drop foreign keys
     $this->schema->table('friend_requests', function ($table) {
         $table->dropForeign('friend_requests_sender_foreign');
         $table->dropForeign('friend_requests_receiver_foreign');
     });
     //Drop table
     $this->schema->dropIfExists('friend_requests');
 }
開發者ID:AshniSukhoo,項目名稱:UOM_connect,代碼行數:13,代碼來源:20160222184600_CreateFriendRequestTable.php

示例4: down

 /**
  * Undo the migration
  */
 public function down()
 {
     //Drop foreign keys
     $this->schema->table('lecturers_courses_faculties', function ($table) {
         $table->dropForeign('lecturer_courses_faculties_uom_id_foreign');
         $table->dropForeign('lecturer_courses_faculties_faculty_id_foreign');
         $table->dropForeign('lecturer_courses_faculties_course_id_foreign');
     });
     //Drop table
     $this->schema->dropIfExists('lecturers_courses_faculties');
 }
開發者ID:AshniSukhoo,項目名稱:UOM_connect,代碼行數:14,代碼來源:20160302175103_CreateLecturerFacultyCoursesTable.php

示例5: dropColumn

 /**
  * Drop a column.
  *
  * @param           $table
  * @param FieldType $type
  */
 public function dropColumn($table, FieldType $type)
 {
     $schema = $type->getSchema();
     if (!$this->schema->hasTable($table)) {
         return;
     }
     $this->schema->table($table, function (Blueprint $table) use($schema) {
         $schema->dropColumn($table);
     });
 }
開發者ID:jacksun101,項目名稱:streams-platform,代碼行數:16,代碼來源:AssignmentSchema.php

示例6: table

 /**
  * Create table if not exist.
  * @param string table
  * @param \Closure $callback
  */
 public function table($table, \Closure $callback)
 {
     try {
         parent::create($table, $callback);
     } catch (\Exception $e) {
         try {
             parent::table($table, $callback);
         } catch (\Exception $e) {
             echo $e->getMessage();
         }
     }
 }
開發者ID:offworks,項目名稱:laraquent,代碼行數:17,代碼來源:Schema.php

示例7: table

 /**
  * Modify a table on the schema.
  *
  * @param  string   $table
  * @param  \Closure $callback
  *
  * @return \Illuminate\Database\Schema\Blueprint
  */
 public static function table($table, Closure $callback)
 {
     static::$instance = static::$instance ?: new static();
     return static::$schema->table($table, $callback);
 }
開發者ID:formula9,項目名稱:framework,代碼行數:13,代碼來源:Schema.php

示例8: up

 public function up()
 {
     $this->schema->table($this->table, function ($table) {
         $this->create($table);
     });
 }
開發者ID:fluxbb,項目名稱:core,代碼行數:6,代碼來源:Migration.php

示例9: table

 /**
  * Modify a table on the schema.
  *
  * @param string $table
  * @param \Closure $callback
  * @return \Illuminate\Database\Schema\Blueprint 
  * @static 
  */
 public static function table($table, $callback)
 {
     return \Illuminate\Database\Schema\Builder::table($table, $callback);
 }
開發者ID:poovarasanvasudevan,項目名稱:voice-app,代碼行數:12,代碼來源:_ide_helper.php

示例10: down

 /**
  * Undo the migration
  */
 public function down()
 {
     $this->schema->table('ci_sessions', function ($table) {
         $table->dropPrimary('ci_sessions_session_id_primary');
     });
 }
開發者ID:AshniSukhoo,項目名稱:UOM_connect,代碼行數:9,代碼來源:20151017203307_AddPrimaryKeyToCISessionsTbale.php


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