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 | |
// create user | |
$user = new \App\User(); | |
$user->name = 'teste'; | |
$user->email = '[email protected]'; | |
$user->password = bcrypt('teste'); | |
$user->save(); | |
// create voter for user |
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 SyncMedic\Validators; | |
use \Prettus\Validator\Contracts\ValidatorInterface; | |
use \Prettus\Validator\LaravelValidator; | |
class LoginValidator extends LaravelValidator | |
{ | |
//RULES | |
protected $rules = [ | |
ValidatorInterface::RULE_CREATE => [ |
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: 30-Out-2016 às 16:40 | |
-- 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"; |
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"; |
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
<?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
<?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 | |
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 | |
$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
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 = ""; | |
} |