This file contains 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
Crie o arquivo dentro de /etc/apache2/sites/available | |
-> vim mvc.conf // Este comando criara um arquivo com o nome mvc.conf | |
Dentro deste arquivo coloque o seguinte codigo | |
<VirtualHost *:80> | |
ServerName mvc.com.br // Nome da URL que voce quer usar | |
DocumentRoot /var/www/REST_MVC/public // Aponta a pasta onde estao os arquivos | |
<Directory /var/www/REST_MVC/public> // Aplica as regras para os arquivos que estao na pasta | |
DirectoryIndex index.php // Primeira pagina a ser executada | |
AllowOverride All // |
This file contains 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 | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
$remetente = "[email protected]"; | |
$destinatario = "[email protected]"; | |
This file contains 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 | |
/** | |
* Gera arquivos com dados para download | |
* @author Rafael Acioly | |
*/ | |
class FileGenerator { | |
private static $controller; | |
private $file; | |
private $data = array(); |
This file contains 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 | |
/** | |
* Upload | |
* | |
* @author Rafael Acioly <[email protected]> | |
* @copyright 2016 Rafael Acioly | |
* @link http://www.github.com/rafa-acioly | |
* @version 1.0.0 | |
* |
This file contains 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
use App\Content; // Model responsavel pelo gerenciamento de conteudo (datas) | |
private $content; | |
public function __construct(Content $content) { | |
$this->content = $content; | |
} | |
public function feed() | |
{ |
This file contains 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
class RecipeController < ApplicationController | |
before_action :find_recipe, only: [:show, :update, :edit, :destroy] | |
def index | |
@recipes = Recipe.all | |
end | |
def new | |
@recipe = Recipe.new | |
end |
This file contains 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 | |
function change_currency_symbol() | |
{ | |
global $woocommerce; | |
return preg_replace('/[$]/', 'R$', $woocommerce->cart->get_cart_total()); | |
} | |
apply_filter('woocommerce_cart_total', 'change_currency_symbol'); |
This file contains 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 | |
$raw = '{ | |
"success": [ | |
{"produto_id": 442}, | |
{"produto_id": 443}, | |
{"produto_id": 444}, | |
{ | |
"5": { | |
"ingredient_id": 5, |
This file contains 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
import Ember from 'ember'; | |
import WoocommerceAPI from 'npm:woocommerce-api'; | |
import sweetAlert from 'npm:sweetalert2'; | |
export default Ember.Route.extend({ | |
model () { | |
return this.store.createRecord('api-auth'); | |
}, | |
actions: { |
OlderNewer