Skip to content

Instantly share code, notes, and snippets.

@ahmadrio
Created October 10, 2019 15:23
Show Gist options
  • Save ahmadrio/bdac956d7d65769b6844ed9573544520 to your computer and use it in GitHub Desktop.
Save ahmadrio/bdac956d7d65769b6844ed9573544520 to your computer and use it in GitHub Desktop.
<?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