[Laravel] Referencing column and referenced column in foreign key constraint are incompatible
->unsigned()->index() public function up () { Schema :: create ( 'meals' , function ( Blueprint $table ) { $table -> increments ( 'id' ); $table -> integer ( 'user_id' )-> unsigned (); $table -> integer ( 'category_id' )-> unsigned (); $table -> string ( 'title' ); $table -> string ( 'body' ); $table -> string ( 'meal_av' ); $table -> timestamps (); $table -> foreign ( 'user_id' ) -> references ( 'id' ) -> on ( 'users' ) -> onDelete ( 'cascade' ); $table -> foreign ( 'category_id' ) -> references ( 'id' ) -> on ( 'categories' ) -> onDelete ( 'cascade' ); }); } ``` ...