After adding $table->engine = 'MyISAM'; seem foreign key is not working anymore. This my main table

```
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->engine = 'MyISAM';
$table->integer('id');
$table->string('user_id',20);
$table->string('name');
$table->primary(['user_id','id']);
$table->rememberToken();
$table->timestamps();
});
DB::statement('ALTER TABLE users CHANGE id id INT(11) NOT NULL 
AUTO_INCREMENT');
}

```

Foreign key table

```
public function up()
{
    Schema::create('useraccesses', function (Blueprint $table) {
        $table->increments('id');
        $table->string('user_id',20);
        $table->datetime('accessTime')->nullable();
        $table->datetime('quittime')->nullable();
        $table->datetime('activeHour')->nullable();
        $table->text('token')->nullable();
        $table->foreign('user_id')
        ->references('user_id')->on('users')
        ->onDelete('cascade');
        $table->timestamps();
    });
}

```

Thanks
['https://Stackoverflow.com/questions/56455406', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10939437/']
Change Jquery 

```
$('li.has-ul a').click(function() {
  $(this).parent().find('.sub-ul').slideToggle(500);
  $(this).parent().toggleClass('active');
  /*event.preventDefault();*/
});

```

<https://jsfiddle.net/lalji1051/kp8x4e7w/4/>
I hope this will help you.

```
$('li.has-ul a').click(function() {
  $(this).siblings('.sub-ul').slideToggle(500);
  $(this).parent().toggleClass('active');
  event.preventDefault();
});

```