Last active
August 29, 2015 14:21
-
-
Save herusdianto/7c8a641724b91aee00b0 to your computer and use it in GitHub Desktop.
Laravel mutate another column to carbon object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App; | |
use Illuminate\Auth\Authenticatable; | |
use Illuminate\Auth\Passwords\CanResetPassword; | |
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; | |
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; | |
use Illuminate\Database\Eloquent\Model; | |
/** | |
* Class User | |
* | |
* @package App | |
*/ | |
class User extends Model implements AuthenticatableContract, CanResetPasswordContract { | |
use Authenticatable, CanResetPassword; | |
/** | |
* The database table used by the model. | |
* | |
* @var string | |
*/ | |
protected $table = 'users'; | |
/** | |
* The attributes that are mass assignable. | |
* | |
* @var array | |
*/ | |
protected $fillable = ['name', 'email', 'password']; | |
/** | |
* The attributes excluded from the model's JSON form. | |
* | |
* @var array | |
*/ | |
protected $hidden = ['password', 'remember_token']; | |
/** | |
* The attributes that should be mutated to dates. | |
* | |
* @var array | |
*/ | |
protected $dates = ['last_login']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment