I would like to understand more regarding Laravel signed URL. The idea is, in my Shopify Online Store, the user can click this link which redirect into a website I developed in Laravel. However I do not fully get it on how can I do this.
So far I did all this by referring to some tutorial I browse in google. This is my web.php:
<?php
use AppHttpControllersAuthController;
use AppHttpControllersRequestPointTransferController;
use IlluminateSupportFacadesRoute;
use AppModelsUser;
use IlluminateHttpRequest;
Route::get('/', function () {
return redirect('request-form');
});
//Redirect to the website I develop for this specific customer (what i plan)
Route::get('request-form', function (Request $request) {
return view('modules.request_point_transfer.index');
})->name('managepoints')->middleware('signed');
Route::get('generate-url',RequestPointTransferController::class);
And my controller:
<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
use IlluminateSupportFacadesURL;
use AppServicesRequestPointTransferService;
use AppServicesRequestPointTransferAPIService;
class RequestPointTransferController extends Controller
{
protected $RequestPointTransferService;
protected $RequestPointTransferAPIService;
public function __invoke(Request $request)
{
// dd($request->all());
$url = URL::signedRoute('managepoints',now()->addMinutes(20));
return $url;
}
I dont fully understand since the url has been generated, how can I use the url for my Shopify Online Store? Is it like in the Shopify, I can display the URL (probably in the account settings for the online store) example: http://127.0.0.1:8000/mywebsite/myemail.gmail.com and when they click it will go to my website? Sorry I am new to this. Thank you very much.