Skip to content

Instantly share code, notes, and snippets.

View uF4No's full-sized avatar

Antonio uF4No

View GitHub Profile
@uF4No
uF4No / googleAuth.js
Created May 4, 2019 17:47
exports function to generate an authenticated OAuth2 client for Google APIs
/**
* googleAuth.js
*
* Generates an OAuthClient to be used by an API service
* Requires path to file that contains clientId/clientSecret and scopes
*/
const {google} = require('googleapis');
const fs = require('fs');
// MessageController.php
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
@uF4No
uF4No / contact.blade.php
Created February 10, 2019 11:09
Laravel blade contact form without reCaptcha
<form action="{{route('contact.send')}}" class="mb-3" method="post" enctype="multipart/form-data">
{!! csrf_field() !!}
<div class="form-row">
<div class="form-group col-md-5">
<label for="name" class="control-label">Name</label>
<input name="name" class="form-control" type="text" id="name" value="{{old('name')}}">
</div>
<div class="form-group col-md-7">
<label for="email" class="control-label">Email</label>
<input name="email" class="form-control" type="email" id="email" value="{{old('email')}}">
@uF4No
uF4No / contact.blade.php
Created February 10, 2019 11:06
Laravel blade contact form with reCaptcha
<form action="{{route('contact.send')}}" class="mb-3" method="post" enctype="multipart/form-data">
{!! csrf_field() !!}
<div class="form-row">
<div class="form-group col-md-5">
<label for="name" class="control-label">Name</label>
<input name="name" class="form-control" type="text" id="name" value="{{old('name')}}">
</div>
<div class="form-group col-md-7">
<label for="email" class="control-label">Email</label>
<input name="email" class="form-control" type="email" id="email" value="{{old('email')}}">