initial commit
This commit is contained in:
38
think.greaterchiangmai.com/app/Models/ArticleModel.php
Normal file
38
think.greaterchiangmai.com/app/Models/ArticleModel.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
use Illuminate\Auth\Passwords\CanResetPassword;
|
||||
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
|
||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Foundation\Auth\Access\Authorizable;
|
||||
|
||||
class ArticleModel extends Model implements AuthenticatableContract, AuthorizableContract, CanResetPasswordContract
|
||||
{
|
||||
use Authenticatable, Authorizable, CanResetPassword;
|
||||
|
||||
public $timestamps = false;
|
||||
/**
|
||||
* The database table used by the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'article';
|
||||
protected $primaryKey = 'id';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [];
|
||||
}
|
||||
40
think.greaterchiangmai.com/app/Models/CategoryModel.php
Normal file
40
think.greaterchiangmai.com/app/Models/CategoryModel.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
use Illuminate\Auth\Passwords\CanResetPassword;
|
||||
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
|
||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Foundation\Auth\Access\Authorizable;
|
||||
use App\Models\SubCategoryModel;
|
||||
|
||||
class CategoryModel extends Model implements AuthenticatableContract, AuthorizableContract, CanResetPasswordContract
|
||||
{
|
||||
use Authenticatable, Authorizable, CanResetPassword;
|
||||
|
||||
public $timestamps = false;
|
||||
/**
|
||||
* The database table used by the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'category';
|
||||
protected $primaryKey = 'id';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [];
|
||||
|
||||
}
|
||||
13
think.greaterchiangmai.com/app/Models/FileDocumentModel.php
Normal file
13
think.greaterchiangmai.com/app/Models/FileDocumentModel.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class FileDocumentModel extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
protected $table = 'file_document';
|
||||
protected $primaryKey = 'id';
|
||||
protected $fillable = [];
|
||||
}
|
||||
13
think.greaterchiangmai.com/app/Models/FileImageModel.php
Normal file
13
think.greaterchiangmai.com/app/Models/FileImageModel.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class FileImageModel extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
protected $table = 'file_image';
|
||||
protected $primaryKey = 'id';
|
||||
protected $fillable = [];
|
||||
}
|
||||
13
think.greaterchiangmai.com/app/Models/FileSoundModel.php
Normal file
13
think.greaterchiangmai.com/app/Models/FileSoundModel.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class FileSoundModel extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
protected $table = 'file_sound';
|
||||
protected $primaryKey = 'id';
|
||||
protected $fillable = [];
|
||||
}
|
||||
13
think.greaterchiangmai.com/app/Models/FileVideoModel.php
Normal file
13
think.greaterchiangmai.com/app/Models/FileVideoModel.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class FileVideoModel extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
protected $table = 'file_video';
|
||||
protected $primaryKey = 'id';
|
||||
protected $fillable = [];
|
||||
}
|
||||
39
think.greaterchiangmai.com/app/Models/SubCategoryModel.php
Normal file
39
think.greaterchiangmai.com/app/Models/SubCategoryModel.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
use Illuminate\Auth\Passwords\CanResetPassword;
|
||||
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
|
||||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Foundation\Auth\Access\Authorizable;
|
||||
|
||||
class SubCategoryModel extends Model implements AuthenticatableContract, AuthorizableContract, CanResetPasswordContract
|
||||
{
|
||||
use Authenticatable, Authorizable, CanResetPassword;
|
||||
|
||||
public $timestamps = false;
|
||||
/**
|
||||
* The database table used by the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'sub_category';
|
||||
protected $primaryKey = 'id';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [];
|
||||
|
||||
}
|
||||
45
think.greaterchiangmai.com/app/Models/User.php
Normal file
45
think.greaterchiangmai.com/app/Models/User.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use HasApiTokens, HasFactory, Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for serialization.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user