mercredi 21 octobre 2015

Mark row for deleting using checkbox

I have this inbox or mails which I needed to mark using checkbox for multiple deletions. The problem is that when I click the checkbox it always go to method read() because of onclick inside the tag. All I want is simple marking. Please see the code below:

@foreach ($messages as $message)    
  <tr onclick="document.location='{{route('account.message.read', array($message->id))}}'">
     <td> <input type="checkbox" name="msg" value="{{$message->id}}"></td>
     <td><strong>{{Str::words($message->subject, 5, '...')}}</strong> {{Str::words($message->message, 20, '...')}}</td>
  </tr>
@endforeach

Now how can I mark each row without going inside that method? I am a newbie btw.




Aucun commentaire:

Enregistrer un commentaire