12345678910111213141516171819202122232425262728293031 |
- <?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 $connection = 'api_mysql';
-
- 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);
- }
- }
|