12345678910111213141516171819202122232425 |
- <?php
- /**
- * Created by PhpStorm.
- * User: zhangda
- * Date: 2018/1/11
- * Time: 下午4:35
- */
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class Notice extends Model
- {
- protected $table = 'notice';
- public $timestamps = false;
- public static function getNoticeByChannelId($channel_id, $type = 1)
- {
- $data = self::select('content', 'title', 'url')->where(['channel_id' => $channel_id, 'status' => 1, 'type' => $type])->get();
- return $data;
- }
- }
|