Skip to content

Instantly share code, notes, and snippets.

View eaponiente's full-sized avatar

Edgar eaponiente

View GitHub Profile
<?php
namespace AppNew\Console\Commands\OneOff;
use App\Type;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use FileInvite\Invite\Models\Attachment;
use Illuminate\Database\Eloquent\Builder;
public function webhook(Request $request)
{
$http_body = file_get_contents("php://input");
$headers = getallheaders();
$key_from_configuration =
"D079ADB4A1EE4FD9CF02034C76EEDC86707F86296DE010A6332848DFD086139B";
$iv_from_http_header = $headers["X-Initialization-Vector"];
$auth_tag_from_http_header = $headers["X-Authentication-Tag"];
public function webhook(Request $request)
{
app('log')->debug('RECEIVED CALL BACK FROM HYPERPAY');
// get all data passed by foodics
$d = json_decode(json_encode($request->all()),true);
// log in the logfile
app('log')->info(print_r($d,true));
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang=""> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Login Credentials</title>
<meta name="description" content="Sufee Admin - HTML5 Admin Template">
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.munchbakery.app">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
var html = '<input type="text" name="first_name[]" />';
html += '<input type="text" name="last_name[]" />';
$('#div').append(html);
//
to get logic
@eaponiente
eaponiente / gist:cc108bfafb2789229e917283e0b8db09
Created August 23, 2017 02:47
Angular 4 multiple checkbox not working
this.isClicked = false;
let rolePermissions = [];
this.sub = this.route.params.subscribe((params) => {
this.roleId = +params['id'];
this.roleService
.find(this.roleId)
.subscribe((role) => {
this.role = role.data.attributes;
let rolePermissionsData = role.data.relationships.permissions;
for (let i in rolePermissionsData) {
<?php
$user = User::where('email', $email)->first();
if($user) {
$user->update([
'key' => str_random(7)
]);
}
@eaponiente
eaponiente / gist:1f6c657d0fd2b451dbb81913cb84272c
Created June 14, 2017 12:21
Form Request for edit validation
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\Rule;
class CompaniesRequest extends FormRequest
{