hypothetical/app/Models/Contact.php

38 lines
662 B
PHP
Raw Normal View History

<?php
2016-01-03 19:08:53 -05:00
namespace App\Models;
2016-01-03 19:08:53 -05:00
use Illuminate\Database\Eloquent\Model;
2016-08-02 22:43:15 -04:00
class Contact extends Model
{
/**
* The contact table
*
* @var string
*/
2016-01-03 19:08:53 -05:00
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();
}
2016-01-03 19:08:53 -05:00
}