This file contains hidden or 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
| import {debounceTime} from 'rxjs/operators' | |
| class ServiceHttp{ | |
| request(){ | |
| return this.http | |
| .get() | |
| .pipe( | |
| debounceTime(300) |
This file contains hidden or 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\Controllers\Auth; | |
| use App\Http\Controllers\Controller; | |
| use Illuminate\Foundation\Auth\AuthenticatesUsers; | |
| use Illuminate\Http\Request; | |
| class LoginController extends Controller | |
| { |
This file contains hidden or 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
| import { Component, OnInit, ElementRef, ViewChild, TemplateRef, ContentChild } from '@angular/core'; | |
| @Component({ | |
| selector: 'app-modal-body', | |
| template: '<ng-container *ngTemplateOutlet="template; context: contextExp"></ng-container>', | |
| styles: [] | |
| }) | |
| export class ModalBodyComponent implements OnInit { | |
| public contextExp = { |
This file contains hidden or 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
| public function render($request, Exception $exception) | |
| { | |
| if ($exception instanceof ModelNotFoundException && $request->isJson()) { | |
| $mensagens = [ | |
| User::class => 'Usuario não encontrado', | |
| Product:class => 'Produto não encontrado' | |
| } | |
| $mensagem = $mensagens[$exception->getModel()] | |
| return response()->json($mensagem, 404); | |
| } |
This file contains hidden or 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
| import {AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelTokenSource} from "axios"; | |
| import axios from 'axios'; | |
| export default class HttpResource { | |
| private cancelList: CancelTokenSource | null = null; | |
| constructor(protected http: AxiosInstance, protected resource) { | |
| } |
This file contains hidden or 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 Pessoa\Form; | |
| use Zend\Form\Fieldset; | |
| use Pessoa\Entity\Cliente; | |
| class ClienteFieldset extends Fieldset { | |
| public function __construct() { |
This file contains hidden or 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 | |
| /** | |
| * Bgy Library | |
| * | |
| * LICENSE | |
| * | |
| * This program is free software. It comes without any warranty, to | |
| * the extent permitted by applicable law. You can redistribute it | |
| * and/or modify it under the terms of the Do What The Fuck You Want |
This file contains hidden or 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
| import { Injectable } from '@angular/core'; | |
| import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http'; | |
| import {Observable} from 'rxjs'; | |
| import {Storage} from '@ionic/storage'; | |
| import { fromPromise } from 'rxjs/observable/fromPromise'; | |
| import {flatMap} from 'rxjs/operators'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) |
This file contains hidden or 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
| import * as $ from 'jquery'; | |
| import 'jquery-mask-plugin/dist/jquery.mask'; | |
| import {Directive, ElementRef} from '@angular/core'; | |
| @Directive({ | |
| selector: '[appMaskNumber]' | |
| }) | |
| export class MaskNumberDirective { |
This file contains hidden or 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
| var anchors = document.querySelectorAll('div.classe>a'); | |
| for (var key in anchors){ | |
| anchors[key].setAttribute('target', '_blank'); | |
| } |