Skip to content

Instantly share code, notes, and snippets.

View tiagoandrepro's full-sized avatar

Tiago André tiagoandrepro

View GitHub Profile
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\Nature;
class Establishment extends Model
{
//
<?php
namespace App\Http\Controllers\Web;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Establishment;
use App\Models\Nature;
use App\Models\Specialty;
use Illuminate\Support\Facades\DB;
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:est="http://servicos.saude.gov.br/cnes/v1r0/estabelecimentosaudeservice" xmlns:fil="http://servicos.saude.gov.br/wsdl/mensageria/v1r0/filtropesquisaestabelecimentosaude" xmlns:cod="http://servicos.saude.gov.br/schema/cnes/v1r0/codigocnes" xmlns:cnpj="http://servicos.saude.gov.br/schema/corporativo/pessoajuridica/v1r0/cnpj">
<soap:Header>
<wsse:Security soap:mustUnderstand="true" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-5FCA58BED9F27C406E14576381084652">
<wsse:Username>CNES.PUBLICO</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">cnes#2015public</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header
<?php
//Data, connection, auth
$dataFromTheForm = $_POST['fieldName']; // request data from the form
$soapUrl = "https://connecting.website.com/soap.asmx?op=DoSomething"; // asmx URL of WSDL
$soapUser = "username"; // username
$soapPassword = "password"; // password
// xml post structure
$xml_post_string = '<?xml version="1.0" encoding="utf-8"?>
@tiagoandrepro
tiagoandrepro / Spatie\Analytics
Created April 21, 2017 17:52
function Spatie\Analytics
public function visitorsAndPageViews()
{
$analyticsData_one = Analytics::fetchVisitorsAndPageViews(Period::days(14));
$this->data['date'] = $analyticsData_one->pluck('date');
$this->data['visitors'] = $analyticsData_one->pluck('visitors');
$this->data['pageTitle'] = $analyticsData_one->pluck('pageTitle');
$this->data['pageViews'] = $analyticsData_one->pluck('pageViews');
dd($this->data);
}
<!DOCTYPE html>
<html>
<head>
<title>Web Semântica</title>
</head>
<body>
<header>
<nav>
<ul>
<li>Link 1<li>
<ion-content scrol="false">
<header class="master config">
<div class="master master top-page conversation-top">
<span class=" master fa icon-menu"></span>
<h1 class=" master">
<span class=" master icon-top icon-settings"></span>Configurações
</h1>
<span class=" master icons icon-envelope"></span>
</div>
</header>
<ion-content scrol="false">
<header class="master config">
<div class="master master top-page conversation-top">
<span class=" master fa icon-menu"></span>
<h1 class=" master">
<span class=" master icon-top icon-settings"></span>Configurações
</h1>
<span class=" master icons icon-envelope"></span>
</div>
</header>
<ion-content scrol="false">
<header class="master config">
<div class="master master top-page conversation-top">
<span class=" master fa icon-menu"></span>
<h1 class=" master">
<span class=" master icon-top icon-settings"></span>Configurações
</h1>
<span class=" master icons icon-envelope"></span>
</div>
</header>
<ion-content scrol="false">
<header class="master config">
<div class="master master top-page conversation-top">
<span class=" master fa icon-menu"></span>
<h1 class=" master">
<span class=" master icon-top icon-settings"></span>Configurações
</h1>
<span class=" master icons icon-envelope"></span>
</div>
</header>