added api macros to request

This commit is contained in:
Denis Duliçi
2021-01-19 14:12:54 +03:00
parent 9269b93e3d
commit f7bc89806c
5 changed files with 14 additions and 4 deletions

View File

@@ -401,7 +401,7 @@ trait Permissions
return;
}
$table = request()->is('api/*') ? request()->segment(2) : '';
$table = request()->isApi() ? request()->segment(2) : '';
// Fire event to find the proper controller for common API endpoints
if (in_array($table, ['contacts', 'documents', 'transactions'])) {