jeudi 15 mars 2018

Run Update query in a migration in Laravel 5?

I created the migration file:

public function up()
{
    //
}

/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
    //
}

I usually used this to creating tables or alter them . Is there a way to run an update query, something like:

UPDATE `mytable` SET `column` = 'test' WHERE `column` != 'test2'; 

and also the reverse of it. How can I do that?

Thank you



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire