Skip to content

Instantly share code, notes, and snippets.

Noel De Martin NoelDeMartin

Block or report user

Report or block NoelDeMartin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@NoelDeMartin
NoelDeMartin / tap.js
Last active Apr 27, 2020
Laravel's tap helper implementation in Javascript & Typescript
View tap.js
// Javascript equivalent of Laravel's tap helper method
// @see https://medium.com/@taylorotwell/tap-tap-tap-1fc6fc1f93a6
// @see https://github.com/laravel/framework/blob/v7.8.0/src/Illuminate/Support/helpers.php#L422..L431
export function proxyTap(target) {
const proxy = new Proxy(target, {
get(target, key, receiver) {
const prop = Reflect.get(target, key, receiver);
if (typeof prop !== 'function')
@NoelDeMartin
NoelDeMartin / NovaServiceProvider.php
Created Sep 22, 2019
Laravel Nova resources boot method
View NovaServiceProvider.php
<?php
namespace App\Providers;
use Laravel\Nova\Nova;
use Laravel\Nova\Cards\Help;
use Illuminate\Support\Facades\Gate;
use Laravel\Nova\NovaApplicationServiceProvider;
class NovaServiceProvider extends NovaApplicationServiceProvider
View Freezable.vue
<script>
let instancesCount = 0;
const rendersCache = {};
// See live example: https://x3t7g.codesandbox.io/
export default {
props: {
tag: {
type: String,
default: "div"
@NoelDeMartin
NoelDeMartin / Browser.php
Created Nov 30, 2017
Laravel Dusk Mail mocking proposal
View Browser.php
<?php
namespace Tests\Browser\Dusk;
use Tests\Testing\MailFake;
use Laravel\Dusk\Browser as BaseBrowser;
class Browser extends BaseBrowser {
public function fake($service) {
You can’t perform that action at this time.