Format Models like the updated User model

This commit is contained in:
Kevin MacMartin 2016-09-03 00:30:02 -04:00
parent 28a82ad735
commit 2d9e500ebe
2 changed files with 30 additions and 12 deletions

View file

@ -1,16 +1,25 @@
<?php namespace App\Models;
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Contact extends Model {
// The contact table
class Contact extends Model
{
/**
* The contact table
*
* @var string
*/
protected $table = 'contact';
// Returns the list of all contact submissions
/**
* Returns the list of all contact submissions
*
* @return array
*/
public static function getContactSubmissions()
{
return self::orderBy('created_at', 'desc')->get();
}
}

View file

@ -1,16 +1,25 @@
<?php namespace App\Models;
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Subscriptions extends Model {
// The subscriptions table
class Subscriptions extends Model
{
/**
* The subscriptions table
*
* @var string
*/
protected $table = 'subscriptions';
// Returns the list of all subscriptions
/**
* Returns the list of all subscriptions
*
* @return array
*/
public static function getSubscriptions()
{
return self::orderBy('created_at', 'desc')->get();
}
}