skip to Main Content

Laravel migration to change an unsignedMediumInteger column

I have a need to create a migration that changes an existing 'unsignedMediumInteger' column to nullable(). I have the following in my migration: <?php use IlluminateDatabaseMigrationsMigration; use IlluminateDatabaseSchemaBlueprint; use IlluminateSupportFacadesSchema; use AppNewModelsSubscriptionType; return new class extends Migration { public function…

VIEW QUESTION

I cannot delete data which have many-to-many relationship in laravel 9 – PHP

I am using PHP 8.2.0, MySQL 8.2.0, and Laravel 9.48.0. This is my database migrations file pivot table (category_menu): public function up() { Schema::create('category_menu', function (Blueprint $table) { $table->foreignId('category_id')->constrained(); $table->foreignId('menu_id')->constrained(); }); } This is the CategoryController.php: public function destroy(Category $category)…

VIEW QUESTION
Back To Top
Search