mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-29 09:59:35 -05:00
37 lines
662 B
PHP
37 lines
662 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Contact extends Model
|
|
{
|
|
/**
|
|
* The contact table
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'contact';
|
|
|
|
/**
|
|
* Dashboard columns
|
|
*
|
|
* @var array
|
|
*/
|
|
public static $dashboard_columns = [
|
|
[ 'Date', 'created_at' ],
|
|
[ 'Name', 'name' ],
|
|
[ 'Email', 'email' ],
|
|
[ 'Message', 'message' ]
|
|
];
|
|
|
|
/**
|
|
* Returns the list of all contact submissions
|
|
*
|
|
* @return array
|
|
*/
|
|
public static function getContactSubmissions()
|
|
{
|
|
return self::orderBy('created_at', 'desc')->get();
|
|
}
|
|
}
|