Skip to content

Instantly share code, notes, and snippets.

View Wpkenpachi's full-sized avatar
🎯
Focusing

Wesley Paulo Wpkenpachi

🎯
Focusing
View GitHub Profile
<?php
$a = '02/02/2018';
$b = '10/07/2018';
$atual = $a;
$dia = null;
while($atual != $b){
$dia = DateTime::createFromFormat('d/m/Y', $atual)->format('D');
if( $dia == 'Thu' ){
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use App\Jobs\ManageEvents;
class Kernel extends ConsoleKernel
<?php
namespace App\Http\Controllers;
use Carbon\Carbon;
use Illuminate\Http\Request;
use App\Jobs\ManageEvents;
class TestController extends Controller
{
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
Avaliacao::select("
UNIX_TIMESTAMP( CONVERT_TZ( time, '+00:00', @@global.time_zone) ) as time,
idrest,
idcliente,
comentario,
alias,
entrega,
comida,
embalagem,
custobeneficio,
<?php
/*
Injeção de dependência em namespaces Diferentes
*/
// Request Class
namespace Illuminate\Http;
class Request {
[PHP][Você Sabia?]
Eae pipou?!
Todos os dias vemos postagens sobre o uso do mysql_connect(), parem de usar esse lixo, TUTORIAL DEFINITIVO DO USO DO PDO de forma simples :D.
|============================
| Instanciado um Objeto do PDO
| obs: importante vamos utilizar essa mesma instância
| para todas as querys
|============================
| // O pdo recebe em seu construtor 3 parametros
| // uma string que informa diver,host e dbname
@Wpkenpachi
Wpkenpachi / vue-googlemaps
Created August 24, 2019 21:50
Exemplo de uso do vue-googlemaps
<template>
<div id="inicio">
<!-- LINHA 1 -->
<b-row>
<b-col col lg="12" class="demo">
<googlemaps-map ref="map" class="map" :center.sync="map.center" :zoom.sync="map.zoom">
<!-- User Position -->
<googlemaps-user-position @update:position="setUserPosition"/>
<!-- Estabelecimento Marker -->
<?php
// Model
namespace Model;
abstract class Connection {
protected $con;
function __construct () {
$this->conn = "Database Conn"; // Aqui fazer a conexão com o banco
}
@Wpkenpachi
Wpkenpachi / php_print
Created January 9, 2020 13:47
Print Driver and Label Print PHP
https://github.com/mike42/escpos-php
https://github.com/RamyTalal/Label-Printer?