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 | |
namespace App\Models; | |
use Illuminate\Database\Eloquent\Model; | |
class Event extends Model | |
{ | |
protected $table = 'events'; |
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
var url = "get_data.php"; | |
var params = "lorem=ipsum&name=binny"; | |
http.open("POST", url, true); | |
//Send the proper header information along with the request | |
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); | |
http.setRequestHeader("Content-length", params.length); | |
http.setRequestHeader("Connection", "close"); | |
http.onreadystatechange = function() {//Call a function when the state changes. |
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
$(document).ready(function() { | |
$('#num').bind('paste', function() { | |
var hasNum = somenteNumeros( $(this).val() ); | |
if( hasNum.length == 0 ) { | |
alert('Somente números'); | |
} else { | |
console.log('legal'); | |
} | |
}); | |
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
function isNumber( $value ) { | |
var $inputs = document.getElementsByClassName('num-input'); | |
for ( i = 0; i <= $inputs.length; i++ ) | |
{ | |
if(!isNaN( $inputs[i].value )){ | |
exit(); | |
} else { | |
alert('O número digitado não é válido'); | |
$inputs[i].value = ""; | |
} |
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 | |
$at = 'teste'; | |
$this->body = sprintf("[%s] %s in %s line %d\n\n%s\n\n%s", $at, $classname, $filename, $line, $message, $trace); |
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 | |
class Teste extends Model | |
{ | |
protected $appends = [ 'num_processo' ]; | |
function getNumProcessoAttribute() { | |
return $this->attributes['numero']; | |
} | |
} |
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 | |
namespace FlyingLuscas\BugNotifier; | |
class MessageTest extends TestCase | |
{ | |
/** | |
* @dataProvider dataExceptionProvider | |
*/ | |
public function testMessageTitleOutput($e) |
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 | |
namespace FlyingLuscas\BugNotifier; | |
class Message | |
{ | |
/** | |
* The title of the message. | |
* | |
* @var string |
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
raank: /var/www/github/Laravel-BugNotifier (improv-msg-date)$ composer test | |
> phpunit | |
PHPUnit 5.6.2 by Sebastian Bergmann and contributors. | |
Runtime: PHP 7.0.12-1+deb.sury.org~xenial+1 | |
Configuration: /var/www/github/Laravel-BugNotifier/phpunit.xml.dist | |
Error: No code coverage driver is available | |
......FFFF 10 / 10 (100%) |
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
-- phpMyAdmin SQL Dump | |
-- version 4.5.4.1deb2ubuntu2 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generation Time: 29-Out-2016 às 21:01 | |
-- Versão do servidor: 5.7.16-0ubuntu0.16.04.1 | |
-- PHP Version: 7.0.12-1+deb.sury.org~xenial+1 | |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |