Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

foreign key nullable in laravel

$table
      ->foreignId('other_table_id')
      ->nullable() // here
      ->references('id')
      ->on('other_table');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #foreign #key #nullable #laravel
ADD COMMENT
Topic
Name
4+9 =