|
@@ 30-34 (lines=5) @@
|
| 27 |
|
{ |
| 28 |
|
$report = call_user_func_array("{$this->getModel()}::with", array($relations))->find($id, $columns); |
| 29 |
|
|
| 30 |
|
if ( ! \Core::users()->can($report->view_name, 'reports')) |
| 31 |
|
{ |
| 32 |
|
$error = $this->errorHandler->noPermissions(); |
| 33 |
|
abort($error['status'], $error['message']); |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
if ( ! $report) |
| 37 |
|
{ |
|
@@ 58-62 (lines=5) @@
|
| 55 |
|
$conditions = $this->constructConditions($conditions); |
| 56 |
|
$report = call_user_func_array("{$this->getModel()}::with", array($relations))->whereRaw($conditions['conditionString'], $conditions['conditionValues'])->first($columns); |
| 57 |
|
|
| 58 |
|
if ( ! \Core::users()->can($report->view_name, 'reports')) |
| 59 |
|
{ |
| 60 |
|
$error = $this->errorHandler->noPermissions(); |
| 61 |
|
abort($error['status'], $error['message']); |
| 62 |
|
} |
| 63 |
|
if ( ! $report) |
| 64 |
|
{ |
| 65 |
|
$error = $this->errorHandler->notFound('report'); |