Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Working and having fun

Jonathan Lamim jlamim

👨‍💻
Working and having fun
View GitHub Profile
View Quartos.php
<?php
public function salvar_atualizacao() {
$quarto = array(
'id_quarto' => $this->input->post('id_quarto'),
'ct_quarto' => $this->input->post('ct_quarto'),
'num_quarto' => $this->input->post('num_quarto'),
'jovem_quarto' => $this->input->post('jovem_quarto'),
'responsavel' => $this->input->post('responsavel'),
'localizacao' => $this->input->post('localizacao'),
'dataem' => $this->input->post('dataem')
@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">
You can’t perform that action at this time.