2016-09-03 00:30:02 -04:00
|
|
|
<?php
|
2016-01-26 23:20:08 -05:00
|
|
|
|
2016-09-03 00:30:02 -04:00
|
|
|
namespace App\Models;
|
2016-01-26 23:20:08 -05:00
|
|
|
|
2016-09-03 00:30:02 -04:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2016-08-02 22:43:15 -04:00
|
|
|
|
2016-09-03 00:30:02 -04:00
|
|
|
class Subscriptions extends Model
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The subscriptions table
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
2016-01-26 23:20:08 -05:00
|
|
|
protected $table = 'subscriptions';
|
|
|
|
|
2018-01-11 01:13:58 -05:00
|
|
|
/**
|
|
|
|
* Dashboard columns
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public static $dashboard_columns = [
|
|
|
|
[ 'Date', 'created_at' ],
|
|
|
|
[ 'Email', 'email' ],
|
|
|
|
[ 'Name', 'name' ]
|
|
|
|
];
|
|
|
|
|
2016-09-03 00:30:02 -04:00
|
|
|
/**
|
|
|
|
* Returns the list of all subscriptions
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
2016-01-26 23:20:08 -05:00
|
|
|
public static function getSubscriptions()
|
|
|
|
{
|
|
|
|
return self::orderBy('created_at', 'desc')->get();
|
|
|
|
}
|
|
|
|
}
|