mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-22 16:04:10 -05:00
36 lines
635 B
PHP
36 lines
635 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Subscriptions extends Model
|
|
{
|
|
/**
|
|
* The subscriptions table
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'subscriptions';
|
|
|
|
/**
|
|
* Dashboard columns
|
|
*
|
|
* @var array
|
|
*/
|
|
public static $dashboard_columns = [
|
|
[ 'Date', 'created_at' ],
|
|
[ 'Email', 'email' ],
|
|
[ 'Name', 'name' ]
|
|
];
|
|
|
|
/**
|
|
* Returns the list of all subscriptions
|
|
*
|
|
* @return array
|
|
*/
|
|
public static function getSubscriptions()
|
|
{
|
|
return self::orderBy('created_at', 'desc')->get();
|
|
}
|
|
}
|