removed enabled column from reports

This commit is contained in:
denisdulici
2019-11-19 14:06:20 +03:00
parent 3e5b5b183d
commit dbb57eb86b
13 changed files with 66 additions and 80 deletions

View File

@ -62,32 +62,6 @@ class Reports extends ApiController
return $this->item($report->fresh(), new Transformer());
}
/**
* Enable the specified resource in storage.
*
* @param Report $report
* @return \Dingo\Api\Http\Response
*/
public function enable(Report $report)
{
$report = $this->dispatch(new UpdateReport($report, request()->merge(['enabled' => 1])));
return $this->item($report->fresh(), new Transformer());
}
/**
* Disable the specified resource in storage.
*
* @param Report $report
* @return \Dingo\Api\Http\Response
*/
public function disable(Report $report)
{
$report = $this->dispatch(new UpdateReport($report, request()->merge(['enabled' => 0])));
return $this->item($report->fresh(), new Transformer());
}
/**
* Remove the specified resource from storage.
*

View File

@ -153,42 +153,6 @@ class Reports extends Controller
return response()->json($response);
}
/**
* Enable the specified resource.
*
* @param Report $report
*
* @return Response
*/
public function enable(Report $report)
{
$response = $this->ajaxDispatch(new UpdateReport($report, request()->merge(['enabled' => 1])));
if ($response['success']) {
$response['message'] = trans('messages.success.enabled', ['type' => $report->name]);
}
return response()->json($response);
}
/**
* Disable the specified resource.
*
* @param Report $report
*
* @return Response
*/
public function disable(Report $report)
{
$response = $this->ajaxDispatch(new UpdateReport($report, request()->merge(['enabled' => 0])));
if ($response['success']) {
$response['message'] = trans('messages.success.disabled', ['type' => $report->name]);
}
return response()->json($response);
}
/**
* Remove the specified resource from storage.
*