Created
July 24, 2018 18:54
-
-
Save NandoKstroNet/de651e5aefe0ff8be262630ac3cffeb9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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