title: laravel mutator increment number when we get the record
body: <p>I have a model called Alsolike , i want when we get the data from the database i want to increment number of views, to know how many times the record viewed  , here is what i tried to do , also if there is a good approche, suggest </p>
  
  <pre><code>    &lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Alsolike extends Model
  {
      public function getMealidAttribute($value)
      {
          $user = App\Alsolike::first()-&gt;increment('view');;
          $user-&gt;save();
      }
  }
  </code></pre>