Skip to content

Instantly share code, notes, and snippets.

<?php
class Foo
{
public function __call($method, $args)
{
if(is_callable(array($this, $method))) {
return call_user_func_array($this->$method, $args);
}
}
@extends('layouts.master')
@section('content')
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="{{ url('job') }}" id="btn-list">{{ Lang::get('job.jobs') }} <span class="badge"></span></a>
</div>
<span class="label label-primary pull-right" style="margin:15px 15px 0px 0px; padding:5px 10px" data-toggle="tooltip" data-placement="top" title="Seu perfil neste projeto é {{ $roles->user()->getProfileConfig('text') }}.">{{ $roles->user()->getProfileConfig('text') }}</span>
@if ($roles->user()->isAdmin())
<?php
use Fluent\Node;
use Fluent\Fluent;
class JobAboutWidget extends Node
{
public function make()
{
$job = $this->data;
@ianrodrigues
ianrodrigues / default
Created March 20, 2017 16:31 — forked from ghalusa/default
nginx default configuration file (ubuntu path: /etc/nginx/sites-available/default) with conversions of .htaccess environment variables and mod_rewrite logic, along with parameters supporting a fastcgi-based php setup
server {
listen 80;
root /var/www/YOUR_DIRECTORY;
index index.php index.html index.htm;
###################################################
# Change "yoururl.com" to your host name
server_name yoururl.com;
<?php
use Fluent\Node;
use Fluent\Fluent;
class BacklogWidget extends Node
{
private $config;
private $cards;
private $controller;
@ianrodrigues
ianrodrigues / .gitlab.ci.yml
Created May 2, 2017 10:51 — forked from yannhowe/.gitlab.ci.yml
.gitlab.ci.yml for SSH with private key.
# Image neeeds to have ssh-client
image: docker:git
services:
- docker:dind
stages:
- staging
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
<div class="container-fluid">
<div class="board-canvas">
<div class="board-column board-height-full"> <!-- height 100% funciona -->
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Panel primary</h3>
</div>
<div class="panel-body board-height-full board-column-canvas"> <!-- height 100% NÃO funciona -->
Panel content
</div>
@ianrodrigues
ianrodrigues / Application.php
Created May 23, 2017 13:26
Custom Application
<?php
namespace App\Foundation;
use Illuminate\Foundation\Application as LaravelApplication;
class Application extends LaravelApplication
{
/**
* My Custom Version.
<?php
namespace Funceme\PCD\Persistence;
use Doctrine\ORM\EntityRepository;
use Illuminate\Support\Collection;
class EstacaoRepository extends EntityRepository
{
/**
@ianrodrigues
ianrodrigues / 1.How to easily implement a REST API with oAuth2 presentation.md
Created September 11, 2017 12:45 — forked from lologhi/1.How to easily implement a REST API with oAuth2 presentation.md
Symfony2 : How to easily implement a REST API with oAuth2 (for normal guys)

It's still a work in progress...

Intro

As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.

Ok, you know the bundles

You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :