Hello fellows,
I'd like to request request new methods for creating/deleting views on migration... (cloud you guys put on your roadmap?)
// View with DB::statement
class CreateMyView extends Migration { public function up() { DB::statement("CREATE VIEW my_view..."); } public function down() { DB::statement('DROP VIEW IF EXISTS my_view'); } }
// View with Schema::createView | Schema::dropViewIfExists
class CreateMyView extends Migration { public function up() { Schema::createView('my_view', function (Blueprint $table) { }); } public function down() { Schema::dropViewIfExists('my_view'); } }
Thank you very much guys!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community