title: Laravel 5 - deleting child model data
body: <p>I have a Model called Campaign which takes the following structure</p>
  
  <pre><code>+----+--------------+-----------------+----------+---------------+--------------+--------------------+----------+-------+--------+---------------------+---------------------+
  | id | campaignName | userId          | clientId | clientContact | contactEmail | campaignObjectives | acNumber | notes | active | created_at          | updated_at          |
  +----+--------------+-----------------+----------+---------------+--------------+--------------------+----------+-------+--------+---------------------+---------------------+
  |  1 | test         |               7 |       10 | Mr Fakes      | 12345        | sdfsdfsd           | 12345    |       |      0 | 2016-02-29 11:51:59 | 2016-02-29 13:51:28 |
  +----+--------------+-----------------+----------+---------------+--------------+--------------------+----------+-------+--------+---------------------+---------------------+
  </code></pre>
  
  <p>I then have a CampaignTypes Model with the following structure</p>
  
  <pre><code>+----+--------------+-----------------+------------+---------------------+---------------------+
  | id | campaignType | creativeArrival | campaignId | created_at          | updated_at          |
  +----+--------------+-----------------+------------+---------------------+---------------------+
  | 14 | Dynamic      | 2016-02-26      |          1 | 2016-02-23 16:00:01 | 2016-02-23 16:00:01 |
  +----+--------------+-----------------+------------+---------------------+---------------------+
  </code></pre>
  
  <p>The relationships in these Models is pretty straight forward.  A Campaign can have many CampaignTypes and a CamapignType belongs to a Campaign.</p>
  
  <p>In the Campaign schema I have an active column.  This is what I use to delete a Campaign.  So the destroy method looks like the following</p>
  
  <pre><code>public function destroy(Campaign $campaign)
  {
      $campaign-&gt;update([
          'active' =&gt; false
      ]);
  
      Session::flash('flash_message', 'Campaign deleted');
      Session::flash('flash_type', 'alert-success');
      return Redirect::route('campaigns.index')-&gt;with('message', 'Campaign deleted.');
  }
  </code></pre>
  
  <p>Now although it does not cause too many problems, I do not currently set any CampaignTypes row as being deleted if its parent Campaign has been deleted.</p>
  
  <p>What would be the best way to delete the child data without actually deleting it?</p>
  
  <p>Thanks</p>