sarga/packages/Webkul/Tax/src/Repositories/TaxMapRepository.php

50 lines
914 B
PHP

<?php
namespace Webkul\Tax\Repositories;
use Webkul\Core\Eloquent\Repository;
/**
* Tax Mapping Reposotory
*
* @author Prashant Singh <prashant.singh852@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class TaxMapRepository extends Repository
{
/**
* Specify Model class name
*
* @return mixed
*/
function model()
{
return 'Webkul\Tax\Models\TaxMap';
}
/**
* @param array $data
* @return mixed
*/
public function create(array $data)
{
$taxMap = $this->model->create($data);
return $taxMap;
}
/**
* @param array $data
* @param $id
* @param string $attribute
* @return mixed
*/
public function update(array $data, $id, $attribute = "id")
{
$taxMap = $this->find($id);
$taxMap->update($data);
return $taxMap;
}
}