2016-09-03 00:30:02 -04:00
|
|
|
<?php
|
2016-01-03 19:08:53 -05:00
|
|
|
|
2016-09-03 00:30:02 -04:00
|
|
|
namespace App\Models;
|
2016-01-03 19:08:53 -05:00
|
|
|
|
2016-09-03 00:30:02 -04:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2016-08-02 22:43:15 -04:00
|
|
|
|
2016-09-03 00:30:02 -04:00
|
|
|
class Contact extends Model
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The contact table
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
2016-01-03 19:08:53 -05:00
|
|
|
protected $table = 'contact';
|
2016-01-26 23:20:08 -05:00
|
|
|
|
2018-01-11 01:13:58 -05:00
|
|
|
/**
|
|
|
|
* Dashboard columns
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public static $dashboard_columns = [
|
|
|
|
[ 'Date', 'created_at' ],
|
|
|
|
[ 'Name', 'name' ],
|
|
|
|
[ 'Email', 'email' ],
|
|
|
|
[ 'Message', 'message' ]
|
|
|
|
];
|
|
|
|
|
2016-09-03 00:30:02 -04:00
|
|
|
/**
|
|
|
|
* Returns the list of all contact submissions
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
2016-01-26 23:20:08 -05:00
|
|
|
public static function getContactSubmissions()
|
|
|
|
{
|
|
|
|
return self::orderBy('created_at', 'desc')->get();
|
|
|
|
}
|
2016-01-03 19:08:53 -05:00
|
|
|
}
|