LinkStack/blocks/heading/handler.php

27 lines
575 B
PHP
Raw Normal View History

<?php
/**
* Handles the logic for "heading" link type.
*
* @param \Illuminate\Http\Request $request The incoming request.
* @param mixed $linkType The link type information.
* @return array The prepared link data.
*/
function handleLinkType($request, $linkType) {
2024-10-15 12:39:10 +02:00
$rules = [
'title' => [
'required',
'string',
'max:255',
],
];
// Prepare the link data
$linkData = [
'title' => $request->title,
'button_id' => "42",
];
2024-10-15 12:39:10 +02:00
return ['rules' => $rules, 'linkData' => $linkData];
}