Created
October 10, 2019 15:23
-
-
Save ahmadrio/bdac956d7d65769b6844ed9573544520 to your computer and use it in GitHub Desktop.
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\Notifications\Notifiable; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
class User extends Authenticatable | |
{ | |
use Notifiable; | |
/** | |
* The attributes that are mass assignable. | |
* | |
* @var array | |
*/ | |
protected $fillable = [ | |
'name', 'email', 'password', 'tanggal_daftar' | |
]; | |
/** | |
* The attributes that should be cast to native types. | |
* | |
* @var array | |
*/ | |
protected $casts = [ | |
'tanggal_daftar' => 'datetime' | |
]; | |
/** | |
* The storage format of the model's date columns. | |
* | |
* @var string | |
*/ | |
protected $dateFormat; | |
/** | |
* Create a new Eloquent model instance. | |
* | |
* @param array $attributes | |
* @return void | |
*/ | |
public function __construct(array $attributes = []) | |
{ | |
parent::__construct($attributes); | |
$this->dateFormat = 'Y-m-d H:i:s'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment