123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace App\Http\Controllers\Api\Base;
- use App\Http\Controllers\Controller;
- use App\Repositories\Enums\ResponseCodeEnum;
- use Illuminate\Http\Request;
- use Jiannei\Response\Laravel\Support\Facades\Response;
- use Prettus\Validator\Contracts\ValidatorInterface;
- use App\Contracts\Repositories\Base\BannerRepository;
- use App\Repositories\Validators\Base\BannerValidator;
- /**
- * Class BannersController.
- *
- * @package namespace App\Http\Controllers\Base;
- */
- class BannersController extends Controller
- {
- /**
- * @var BannerRepository
- */
- protected $repository;
- /**
- * @var BannerValidator
- */
- protected $validator;
- /**
- * BannersController constructor.
- *
- * @param BannerRepository $repository
- * @param BannerValidator $validator
- */
- public function __construct(BannerRepository $repository, BannerValidator $validator)
- {
- $this->repository = $repository;
- $this->validator = $validator;
- }
- public function index(Request $request)
- {
- $lists = $this->repository->all();
- return Response::success($lists);
- }
- }
|