change the notification service
This commit is contained in:
@@ -2,12 +2,16 @@
|
||||
|
||||
namespace App\Services\Cartables\RoadObservation;
|
||||
|
||||
use App\Exceptions\ProhibitedAction;
|
||||
use App\Facades\DataTable\DataTableFacade;
|
||||
use App\Models\RoadObserved;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SupervisorService
|
||||
{
|
||||
/**
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$user = auth()->user();
|
||||
@@ -27,10 +31,7 @@ class SupervisorService
|
||||
}
|
||||
elseif ($user->hasPermissionTo('show-fast-react-province'))
|
||||
{
|
||||
if (is_null($user->province_id))
|
||||
{
|
||||
return $this->errorResponse('استانی برای شما در سامانه ثبت نشده است!');
|
||||
}
|
||||
throw_if(is_null($user->province_id), new ProhibitedAction('استانی برای شما در سامانه ثبت نشده است!'));
|
||||
|
||||
$query = RoadObserved::query()->leftjoin('edarate_shahri', 'road_observeds.edarate_shahri_id', 'edarate_shahri.id')
|
||||
->where('road_observeds.province_id', $user->province_id)
|
||||
|
||||
Reference in New Issue
Block a user