Skip to content

Instantly share code, notes, and snippets.

@maxca
Created May 31, 2018 01:31
Show Gist options
  • Save maxca/b2c42036268ce00295c51d8c4dc551d1 to your computer and use it in GitHub Desktop.
Save maxca/b2c42036268ce00295c51d8c4dc551d1 to your computer and use it in GitHub Desktop.
<?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