zalazdi

Untitled

Mar 8th, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.55 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Entities;
  4.  
  5. use Illuminate\Database\Eloquent\Model;
  6. use Illuminate\Database\Eloquent\SoftDeletes;
  7.  
  8. class ApiKey extends Model
  9. {
  10.     use SoftDeletes;
  11.  
  12.     /**
  13.      * The attributes that should be mutated to dates.
  14.      * @var array
  15.      */
  16.     protected $dates = ['created_at', 'updated_at', 'deleted_at'];
  17.  
  18.     /**
  19.      * The database table used by the model.
  20.      * @var string
  21.      */
  22.     protected $table = 'api_keys';
  23.  
  24.     /**
  25.      * The attributes that are mass assignable.
  26.      * @var array
  27.      */
  28.     protected $fillable = [
  29.         'website',
  30.         'key',
  31.         'user_id',
  32.     ];
  33.  
  34.     /*
  35.      | ------------------------------------------------
  36.      | Entity relationships
  37.      | ------------------------------------------------
  38.      | Place below all relationships
  39.      |
  40.      */
  41.  
  42.     public function user()
  43.     {
  44.         return $this->belongsTo('App\Entities\User');
  45.     }
  46.  
  47.     /*
  48.      | ------------------------------------------------
  49.      | Entity exclusive methods
  50.      | ------------------------------------------------
  51.      | All methods based directly on Entity
  52.      |
  53.      */
  54.  
  55.     /*
  56.      | ------------------------------------------------
  57.      | Entity scopes
  58.      | ------------------------------------------------
  59.      | Query builder scopes
  60.      |
  61.      */
  62.  
  63.     /*
  64.      | ------------------------------------------------
  65.      | Entity attributes
  66.      | ------------------------------------------------
  67.      | The most used attributes of Recruitment Entity
  68.      |
  69.      */
  70. }
Add Comment
Please, Sign In to add comment