Skip to content

Instantly share code, notes, and snippets.

@NandoKstroNet
Created July 24, 2018 18:54
Show Gist options
  • Save NandoKstroNet/de651e5aefe0ff8be262630ac3cffeb9 to your computer and use it in GitHub Desktop.
Save NandoKstroNet/de651e5aefe0ff8be262630ac3cffeb9 to your computer and use it in GitHub Desktop.
<?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class UploadController extends Controller
{
/**
* @Route("/", name="home_upload")
*/
public function index()
{
return $this->render('upload/index.html.twig');
}
/**
* @Route("/upload", name="upload", methods="POST")
*/
public function upload(Request $request)
{
print '<pre>';
var_dump($request->files->all());
return new Response('Teste...');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment