Schema::dropIfExists PHP Method

dropIfExists() public static method

Drop a table from the schema if it exists.
public static dropIfExists ( string $table ) : Illuminate\Database\Schema\Blueprint
$table string
return Illuminate\Database\Schema\Blueprint
        public static function dropIfExists($table)
        {
            //Method inherited from \Illuminate\Database\Schema\Builder
            return \Illuminate\Database\Schema\MySqlBuilder::dropIfExists($table);
        }

Usage Example

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('user_providers', function (Blueprint $table) {
         $table->dropForeign('user_providers_user_id_foreign');
     });
     Schema::dropIfExists('user_providers');
 }
All Usage Examples Of Schema::dropIfExists