title: How do I create a model in laravel?
body: <p>I'm having some difficulties properly understanding laravel models. Let's take the default model provided by the framework as an example.</p>
  
  <p>This is the whole content of the Model:</p>
  
  <p><strong>User.php</strong></p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Auth\UserTrait;
  use Illuminate\Auth\UserInterface;
  use Illuminate\Auth\Reminders\RemindableTrait;
  use Illuminate\Auth\Reminders\RemindableInterface;
  
  class User extends Eloquent implements UserInterface, RemindableInterface {
  
      use UserTrait, RemindableTrait;
  
      /**
       * The database table used by the model.
       *
       * @var string
       */
      protected $table = 'users';
  
      /**
       * The attributes excluded from the model's JSON form.
       *
       * @var array
       */
      protected $hidden = array('password', 'remember_token');
  
  }
  </code></pre>
  
  <p>I understand everything that happens between <code>{}</code>. But there are things I'm totally lost:</p>
  
  <p>Like, how to set this:</p>
  
  <pre><code>use Illuminate\Auth\UserTrait;
  use Illuminate\Auth\UserInterface;
  use Illuminate\Auth\Reminders\RemindableTrait;
  use Illuminate\Auth\Reminders\RemindableInterface;
  </code></pre>
  
  <p>Do I need that if I'm creating a model to let's say the table <code>products</code> instead of the table <code>users</code>? And which ones do I need to <code>use</code> if the table is other rather than a user table and doesn't require authentication? Am I also not understanding properly the authentication?</p>
  
  <p>Plus, there is another one:</p>
  
  <pre><code>class User extends Eloquent implements UserInterface, RemindableInterface
  </code></pre>
  
  <p>I know I have to extend eloquent class in order to interact with the database, but same question regarding the implements: <strong>Do I need them for a no-users table? Do I need a different ones ?</strong></p>
  
  <p>Thank you for all the help you guys can provide me and if I didn't make myself clear enough or you just have any doubt, something else you want to know from me, don't hesitate to ask me. I'm really looking forward to have a well rounded comprehension of models in laravel before going further in the project I'm working now and getting stuck due to a lack of basic concepts regarding the technology that I'm using rather than due to the common technical difficulty that working in programming has. Learning the hard way just means that you didn't get the right approach while learning. I've been bitten by that dog several times.</p>