removed enabled column from reports
This commit is contained in:
@ -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.
|
||||
*
|
||||
|
@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user