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
/* Middleware JWTAuthNew - Verifica todos os requisitos de autenticação antes de permitir que a rota deseja executada */ | |
Route::group(array('middleware' => 'jwt.auth.new'), function(){ | |
}); |
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\Http\Middleware; | |
use Closure; | |
use Tymon\JWTAuth\Exceptions\JWTException; | |
use Tymon\JWTAuth\Exceptions\TokenExpiredException; | |
use Tymon\JWTAuth\Middleware\BaseMiddleware; | |
use JWTAuth; | |
class JWTAuthNew extends BaseMiddleware | |
{ |
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
@foreach($veiculos as $veiculo) | |
<tr> | |
<td>VEICULO PROPRIETÁRIO?</td> | |
<td></td> | |
</tr> | |
@endforeach |
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
{ | |
"tipo_carroceria": [ | |
{ | |
"id": "1", | |
"tipo": "Carroceria 01" | |
}, | |
{ | |
"id": "2", | |
"tipo": "Carroceria 02" | |
} |
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 | |
$nome = $_POST['nome']; | |
$idade = $_POST['idade']; | |
$data = array( | |
'nome' => $nome, | |
'idade' => $idade | |
); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int read_line(FILE *in, char *buffer, size_t max) | |
{ | |
return fgets(buffer, max, in) == buffer; | |
} | |
void cadastrarVendedor(){ |
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
{ | |
"cardapio": { | |
"Promocoes": [ | |
{ | |
"id_produto": "1625", | |
"nome": "Atum", | |
"ingredientes": null, | |
"precos": "20", | |
"validade_promocao": [ | |
"segunda", |
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 search($id){ | |
$sql = "SELECT id,value,type FROM mt_type WHERE fk_questao = :id"; | |
try{ | |
$db = getConnection(); | |
$stmt = $db->prepare($sql); | |
$stmt->bindParam('id',$id); | |
$stmt->execute(); | |
$result = $stmt->fetchAll(PDO::FETCH_ASSOC); | |
}catch(PDOException $e){ | |
echo $e->getMessage(); |
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 search($id){ | |
$sql = "SELECT id,value,type FROM mt_type WHERE fk_questao = :id"; | |
try{ | |
$db = getConnection(); | |
$stmt = $db->prepare($sql); | |
$stmt->bindParam('id',$id); | |
$stmt->execute(); | |
$result = $stmt->fetchAll(PDO::FETCH_ASSOC); | |
}catch(PDOException $e){ | |
echo $e->getMessage(); |
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 getConnection() { | |
$dbhost="localhost"; | |
$dbuser="root"; | |
$dbpass="root"; | |
$dbname="db_name"; | |
$dbh = new PDO("mysql:host=$dbhost;dbname=$dbname;", $dbuser, $dbpass); | |
$dbh -> exec("set names utf8"); | |
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
return $dbh; | |
} |
NewerOlder