Skip to content

Instantly share code, notes, and snippets.

@omarkdev
Created May 15, 2017 19:30
Show Gist options
  • Save omarkdev/567504be111bac88df9a49700f86d7fb to your computer and use it in GitHub Desktop.
Save omarkdev/567504be111bac88df9a49700f86d7fb to your computer and use it in GitHub Desktop.
<?php
protected function indexAction()
{
if ($this->security->isGranted('ADMIN')) {
return $this->render('admin/index.html.twig');
}
return $this->render('home/access_denied.html.twig');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment