laravel-share
laravel-share copied to clipboard
Laravel the second parameter of the passed URL is not shown while sharing with social media
I'm using this library for a Laravel project. It works well except it doesn't work while adding multiple parameters to the URL which is going to be shared.
public function ShareWidget(Request $request)
{
$shareURL = url('/') . '/newproducts' . '?' . http_build_query([
'catalog' => $request->catalog,
'category' => $request->category
]);
$shareComponent = ShareFacade::page(
$shareURL,
null,
)
->facebook()
->telegram()
->whatsapp();
return view('share-component', compact('shareComponent'));
}
The ShareWidget function is responsible to make a URL and share it with the users on social medias. While I print out the ShareURL it shows what's supposed to be: [(http://127.0.0.1:8000/newproducts?catalog=1&category=11)]
.
However, when its comes to the final stage which is the link that had been shared with users on social medias it misses the second parameter. No matter what it is. [(http://127.0.0.1:8000/newproducts?catalog=1)]
.
As you see &category=11 part is missed in the second one.