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 Atd\UserBundle\Listener; | |
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent, | |
Symfony\Component\Security\Core\Exception\AccessDeniedException, | |
Symfony\Component\HttpFoundation\Request, | |
Symfony\Component\HttpFoundation\RedirectResponse, | |
Symfony\Component\HttpFoundation\Session\Session, | |
Symfony\Component\Routing\Router; |
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
parameters: | |
kernel.listener.atd.access_denied.class: Acme\Bundle\Listener\AccessDeniedListener | |
services: | |
kernel.listener.accessDenied: | |
class: %kernel.listener.atd.access_denied.class% | |
scope: request | |
arguments: ["@session", "@router", "@request"] | |
tags: | |
- { name: kernel.event_listener, event: kernel.exception, method: onAccessDeniedException } |
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
id, field1, field2, field3 | |
{% for row in data %} | |
{{ row.id }},{{ row.field1 }},{{ row.field2 }},{{ row.field3 }} | |
{% endfor %} |
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 Acme\DefaultBundle\Entity; | |
use DateTime; | |
use Gedmo\Mapping\Annotation as Gedmo; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="acme_activity_log") |
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 | |
// model function | |
public function getRedirectTo() | |
{ | |
switch($this->role->slug) { | |
case 'admin': | |
$route = 'admin.dashboard'; | |
break; | |
case 'member': |
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
upstream booking_ws_server { | |
server 127.0.0.1:8000; | |
} | |
server { | |
listen 80; | |
listen [::]:80; | |
root /var/www/vhosts/Work/roam-dev-env/repos/booking/dist; |
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
#!/usr/bin/env bash | |
cd /var/www/projects/projectname | |
sudo find storage/ -type f -exec chmod 664 {} \; | |
sudo find storage/ -type d -exec chmod 775 {} \; | |
sudo find bootstrap/cache/ -type f -exec chmod 664 {} \; | |
sudo find bootstrap/cache/ -type d -exec chmod 775 {} \; | |
sudo chown -R www-data:dev storage |