title: How to create hook in strongloop loopback for soft delete
body: <p>I am expecting to create hook in Strongloop Loopback for all model for the purpose of achieving the soft delete. </p>
  
  <p>I wish to include where filter automatically as deleted:0 so only non-deleted data is retrieved. I want same logic for validation, that automatically my query concatenate with deleted:0 condition. I want same for associations, so only related data is fetched. </p>
  
  <p>To achieve so from DB side I have created a flag with default value 0. If I wish to fetch deleted records. I simply attach deleted:1 so it overrite base condition. Ang gives me relevant. </p>
  
  <p>I am PHP Dev so to achive so in frameworks, I attach condition in beforeFilter in base model. Please help me here with Strongloop Loopback. </p>