Skip to content

Instantly share code, notes, and snippets.

Jonathan Lamim (JLamim) jlamim

Block or report user

Report or block jlamim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jlamim
jlamim / docker-compose.yml
Created Feb 6, 2017
Docker Compose - CodeIgniter + Docker - Tutorial 2
View docker-compose.yml
# I use ENV variables to name my containers and set the ports
# to change, replate it here or in .env file
version: '2'
services:
php:
container_name: ${APP_NAME}-php
image: jlamim/php7-nginx
volumes:
- ./src:/var/www/src
links:
@jlamim
jlamim / docker-compose.yml
Last active Feb 6, 2017
Docker Compose - CodeIgniter + Docker - Tutorial 1
View docker-compose.yml
# Versão do Docker Compose
version: '2'
# Define os serviços que serão utilizados
services:
php:
# Define o nome do container
container_name: ${APP_NAME}-php
# Define a imagem que será utilizada para o container
image: jlamim/php7-nginx
# Define os volumes, ou seja, o local onde estarão os arquivos da aplicação
@jlamim
jlamim / Welcome.php
Created Jan 31, 2017
Apigen - Exemplo de classe documentada
View Welcome.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Classe padrão do CodeIgniter
*/
class Welcome extends CI_Controller {
/**
* Conjunto de informações sobre a aplicação
@jlamim
jlamim / apigen.neon
Created Jan 31, 2017
Apigen - Arquivo de configuração
View apigen.neon
# Título que será exibido na documentação
title: 'Exemplo de documentação com CodeIgniter e APIGEN'
# Template utilizado na documentação: default, bootstrap
templateTheme: 'default'
# Diretório onde está o código-fonte que deve ter a documentação gerada
source:
- 'application'
@jlamim
jlamim / Categoria.php
Created Jan 16, 2017
Doctrine e CodeIgniter - Model/Entity
View Categoria.php
<?php namespace Entity;
/**
*
* @Entity
* @Table(name="categoria")
*/
class Categoria
{
/**
@jlamim
jlamim / Categoria.php
Created Jan 16, 2017
Doctrine e CodeIgniter - Controller
View Categoria.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Categoria extends CI_Controller {
public function add()
{
// Instancia o objeto Categoria
$categoria = new Entity\Categoria();
@jlamim
jlamim / Doctrine.php
Created Jan 16, 2017
Doctrine CodeIgniter Library
View Doctrine.php
<?php
use Doctrine\Common\ClassLoader,
Doctrine\ORM\Tools\Setup,
Doctrine\ORM\EntityManager;
class Doctrine
{
public $em;
@jlamim
jlamim / Blade.php
Created Jan 13, 2017
Library Blade Template Engine
View Blade.php
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/**
* Blade Integration Class
*
* Classe utilizada para integração entre o CodeIgniter e a Blade Template Engine
*/
class Blade
{
public function __construct()
@jlamim
jlamim / welcome_message.php
Last active Jan 9, 2017
Google reCaptcha com CodeIgniter - view welcome_message
View welcome_message.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Integrando o Google reCaptcha com CodeIgniter</title>
<style type="text/css">
@jlamim
jlamim / welcome.php
Last active Jan 9, 2017
Google reCaptcha com CodeIgniter - Controller Welcome
View welcome.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index()
{
// Define as chaves de acesso à API
$dados['siteKey'] = 'SUA_SITE_KEY';
$dados['secretKey'] = 'SUA_SECRET_KEY';
You can’t perform that action at this time.