Skip to content

Instantly share code, notes, and snippets.

View brunokunace's full-sized avatar
🕶️
Turn down for what?

Bruno Henry brunokunace

🕶️
Turn down for what?
View GitHub Profile
<?php
namespace App\Http\Repositories;
use Illuminate\Database\Eloquent\Model as Eloquent;
class CategoryRepository extends Repository
{
public function __construct(Eloquent $model)
{
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Http\Repositories\Repository;
use ErrorException;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
<?php
use Illuminate\Http\Request;
$routeNames = [
'Category',
'Post',
'Contributor'
];
<?php include_once "init.php"; ?>
<?php
if(trim($_GET['ref'])==''){
$_GET['ref']='/my/';
}
?>
<?php
$edit=false;
if(trim($_GET['controller'])=='edit'){
if(!isset($_SESSION['userid'])){
// Gostaria de refatorar esses if's e else's porem tenho que preencher o array $Links independente da verificação
if ($this->getPager() > 1):
$this->Links[] = "<div class='col-sm-12 text-center'><ul class='pagination'><li><a class='' href='?'" . $this->getPage() . "=1\">Primeira</a></li>";
else:
$this->Links[] = "<div class='col-sm-12 text-center'><ul class='pagination'><li class='active'></li>";
endif;
if ($this->getPager() != $total_pages):
$this->Links[] = "<li><a class='' href='?'" . $this->getPage() . "=" . $total_pages . ">Última</a></li></ul></div>";
<template>
<gmap-map
:center="{lat: options.initialLat, lng: options.initialLng}"
:zoom="options.initialZoom"
style="height: 100%; width: 100%; position: absolute; top: 0; left: 0;"
:options="{disableDefaultUI: true}"
>
<gmap-marker
:position="{lat: options.initialLat, lng: options.initialLng}"
:clickable="false"
public function authenticate()
{
$credentials = request()->only('cpf', 'password');
try
{
$token = JWTAuth::attempt($credentials);
if(!$token){
$credentials['email'] = $credentials['cpf'];
unset($credentials['cpf']);
<?xml version='1.0' encoding='utf-8'?>
<widget id="br.tur.hotelsolar" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Solar Vacation Club</name>
<description>
Mapa Interativo de Salinópolis
</description>
<author email="[email protected]" href="https://hotelsolar.tur.br/">
Solar Vacation Club
</author>
<content src="index.html" />
public function authenticate()
{
$credentials = request()->only('cpf', 'password');
try
{
$token = JWTAuth::attempt($credentials);
if(!$token){
$credentials['email'] = $credentials['cpf'];
unset($credentials['cpf']);
# v2 syntax
version: '2'
services:
mysql-HOST:
image: ambientum/mysql:5.7
container_name: mysql-HOST
volumes:
- ./.docker/mysql:/var/lib/mysql