mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-25 08:51:25 -05:00
Format Models like the updated User model
This commit is contained in:
parent
28a82ad735
commit
2d9e500ebe
2 changed files with 30 additions and 12 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue