<?php

namespace App\Repositories;

use App\Models\Gallery;
use Prettus\Repository\Eloquent\BaseRepository;
use Prettus\Repository\Criteria\RequestCriteria;
use App\Models\Pages;
use Illuminate\Http\Request;

class GalleryRepositoryEloquent extends BaseRepository
{

    public function model()
    {
        return Gallery::class;
    }

    public function indexPage()
    {
        $get_gall = parent::all();
        return view('admin.gallery.index', compact('get_gall'));
    }

    public function createPage()
    {
        return view('admin.gallery.add');

    }
    public function editPage($id)
    {
        $find_recovery = parent::find($id);
        return view('admin.gallery.update', compact('find_recovery'));

    }

    public function create($data)
    {
        return  parent::create($data);
    }
    public function update($data, $id)
    {
        return parent::update($data, $id);

    }

    public function delete($id)
    {
        return parent::delete($id);
    }

    public function getById($id)
    {
        return parent::find($id);
    }


    public function getAllSliders()
    {
        return parent::all();
    }

}