<?php
namespace App\Repositories;
use App\Models\StarNews;
use Dingo\Api\Http\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
/**
 * Created by PhpStorm.
 * User: durong
 * Date: 2019/6/17
 * Time: 下午18:59
 */

class StarNewsRepository
{
    public function __construct(StarNews $starNews)
    {
        $this->starNews = $starNews;
    }

    public function index($request)
    {
        $this->starNews = $this->starNews
            ->orderBy('id', 'desc')->get();

        return $this->starNews;
    }
}