laravel foreignID key form code example
Example 1: foreign key laravel migration
$table->foreign('column_name')->references('id')->on('table_name')->onDelete('cascade');
Example 2: foreign key string laravel
Schema::table('portfolios', function (Blueprint $table) {
$table->string('filter_alias');
$table->foreign('filter_alias')->cascadeOnDelete()->references('alias')->on('filters');
});