mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-22 07:54:11 -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;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class Contact extends Model {
|
class Contact extends Model
|
||||||
|
{
|
||||||
// The contact table
|
/**
|
||||||
|
* The contact table
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
protected $table = 'contact';
|
protected $table = 'contact';
|
||||||
|
|
||||||
// Returns the list of all contact submissions
|
/**
|
||||||
|
* Returns the list of all contact submissions
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public static function getContactSubmissions()
|
public static function getContactSubmissions()
|
||||||
{
|
{
|
||||||
return self::orderBy('created_at', 'desc')->get();
|
return self::orderBy('created_at', 'desc')->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,25 @@
|
||||||
<?php namespace App\Models;
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class Subscriptions extends Model {
|
class Subscriptions extends Model
|
||||||
|
{
|
||||||
// The subscriptions table
|
/**
|
||||||
|
* The subscriptions table
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
protected $table = 'subscriptions';
|
protected $table = 'subscriptions';
|
||||||
|
|
||||||
// Returns the list of all subscriptions
|
/**
|
||||||
|
* Returns the list of all subscriptions
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public static function getSubscriptions()
|
public static function getSubscriptions()
|
||||||
{
|
{
|
||||||
return self::orderBy('created_at', 'desc')->get();
|
return self::orderBy('created_at', 'desc')->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue