Created
May 31, 2018 01:31
-
-
Save maxca/b2c42036268ce00295c51d8c4dc551d1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* @author samark chaisanguan | |
* @email [email protected] | |
*/ | |
namespace App\Models\Blog; | |
use Illuminate\Database\Eloquent\Model; | |
# use Illuminate\Database\Eloquent\SoftDeletes; | |
class BlogModel extends Model | |
{ | |
# use SoftDeletes; | |
protected $fillable = [ | |
'id', | |
'topic', | |
'detail', | |
'created_at', | |
'updated_at', | |
]; | |
/** | |
* set table name | |
* @var string | |
*/ | |
protected $table = 'blog'; | |
/** | |
* set casting value | |
* @var array | |
*/ | |
protected $casts = []; | |
/** | |
* set append attribute | |
* use get{NameColumn}Attribute function | |
* @var array | |
*/ | |
protected $appends = []; | |
/** | |
* set datetime column | |
* @var array | |
*/ | |
protected $dates = ['created_at', 'updated_at']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment