laravel 7 keeps adding ‘/public/’ to my api routes

I am trying to make a php curl request to my laravel api Here’s the curl function function CallAPI($method, $url, $data = false) { $curl = curl_init(); switch ($method) { case &…

My custom message Request validator not work Laravel

I use the Request validation but I don’t get message from request. Look my code and see my mistake. Only important is store function which work good if all fields is fullfiled but if any field not …

How to get query string in Symfony 4

I am trying to access the query string parameters in Symfony 4 namespace AppController; use SymfonyComponentHttpFoundationRequestStack; class Home extends Controller { private $request; …

How can I sanitize laravel Request inputs?

I have MyRequest.php class extending AppHttpRequestsRequest. I want to trim() every input before validation because an e-mail with a space after it does not pass validation. However sanitize() was …

PHP – failed to open stream : redirection limit reached

My codes is here Here is the error How can solve this Warning: file_get_contents(http://123.com/video/latest.php): …

Doing HTTP requests FROM Laravel to an external API

What I want is get an object from an API with a HTTP (eg, jQuery’s AJAX) request to an external api. How do I start? I did research on Mr Google but I can’t find anything helping. Im starting to …