PHP code example of redrat / api-helper-bundle
1. Go to this page and download the library: Download redrat/api-helper-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
redrat / api-helper-bundle example snippets
class MyController
{
public function handleForm(Request $request): Response
{
$myName = $request->get('myName'); // return Joubert RedRat
}
public function handleApi(Request $request): Response
{
$myName = $request->get('myName'); // return null
}
}
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
RedRat\ApiHelperBundle\ApiHelperBundle::class => ['all' => true],
];