mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-22 07:40:58 +00:00
Revised webhooks list to new format
Also aligned query naming to start with model in use. Also added created/updated sort options to roles.
This commit is contained in:
parent
98b59a1024
commit
f75091a1c5
12 changed files with 123 additions and 40 deletions
app/Http/Controllers
|
@ -3,6 +3,7 @@
|
|||
namespace BookStack\Http\Controllers;
|
||||
|
||||
use BookStack\Actions\ActivityType;
|
||||
use BookStack\Actions\Queries\WebhooksAllPaginatedAndSorted;
|
||||
use BookStack\Actions\Webhook;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
@ -18,16 +19,23 @@ class WebhookController extends Controller
|
|||
/**
|
||||
* Show all webhooks configured in the system.
|
||||
*/
|
||||
public function index()
|
||||
public function index(Request $request)
|
||||
{
|
||||
$webhooks = Webhook::query()
|
||||
->orderBy('name', 'desc')
|
||||
->with('trackedEvents')
|
||||
->get();
|
||||
$listDetails = [
|
||||
'search' => $request->get('search', ''),
|
||||
'sort' => setting()->getForCurrentUser('webhooks_sort', 'name'),
|
||||
'order' => setting()->getForCurrentUser('webhooks_sort_order', 'asc'),
|
||||
];
|
||||
|
||||
$webhooks = (new WebhooksAllPaginatedAndSorted())->run(20, $listDetails);
|
||||
$webhooks->appends(['search' => $listDetails['search']]);
|
||||
|
||||
$this->setPageTitle(trans('settings.webhooks'));
|
||||
|
||||
return view('settings.webhooks.index', ['webhooks' => $webhooks]);
|
||||
return view('settings.webhooks.index', [
|
||||
'webhooks' => $webhooks,
|
||||
'listDetails' => $listDetails,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue