48 lines
914 B
PHP
48 lines
914 B
PHP
<?php
|
|
|
|
namespace App\Models\CMS\Forms;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ContactUS extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The table associated with the model.
|
|
*/
|
|
protected $table = 'contact_us';
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* title - string
|
|
* phone - string
|
|
* content - text
|
|
* type - string | in: website,admin,mobile_admin,mobile_app
|
|
* user_id - int
|
|
*
|
|
* @var array<string>
|
|
*/
|
|
protected $fillable = [
|
|
'title',
|
|
'phone',
|
|
'content',
|
|
'type',
|
|
'user_id',
|
|
];
|
|
|
|
/**
|
|
* User
|
|
*
|
|
* User that submitted form
|
|
*/
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|