2024-06-20 12:24:54 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handles the logic for "telephone" 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 = [
|
|
|
|
'link' => [
|
|
|
|
'required',
|
|
|
|
'max:255',
|
|
|
|
],
|
|
|
|
];
|
|
|
|
|
2024-06-20 12:24:54 +02:00
|
|
|
// Prepare the link data
|
|
|
|
$linkData = [
|
|
|
|
'title' => $request->title,
|
|
|
|
'button_id' => "44",
|
2024-10-15 12:39:10 +02:00
|
|
|
'link' => $request->link,
|
2024-06-20 12:24:54 +02:00
|
|
|
];
|
|
|
|
|
2024-10-15 12:39:10 +02:00
|
|
|
return ['rules' => $rules, 'linkData' => $linkData];
|
2024-06-20 12:24:54 +02:00
|
|
|
}
|