<?php
/**
 * Created by PhpStorm.
 * User: hp
 * Date: 2017/11/22
 * Time: 10:46
 */

namespace App\Modules\Promotion\Models;

use Illuminate\Database\Eloquent\Model;

class PromotionPage extends Model
{
    protected $table = 'promotion_pages';

    /**
     * @return mixed  获取所有的推广页面链接
     */
    static function getAllPromotionPage()
    {
        return $promotionPageResult = self::select('id', 'title', 'description', 'link')->where('is_enabled', 1)->get();
    }

    static function getById($page_id)
    {
    	return self::find($page_id);
    }
}