Skip to content

Instantly share code, notes, and snippets.

View freshway's full-sized avatar

Javier García-Fresca Pérez freshway

View GitHub Profile
@freshway
freshway / WordPress Custom Global Variables.md
Created February 1, 2021 17:55 — forked from aahan/WordPress Custom Global Variables.md
Creating and using custom global variables in wordpress.

First create global variables (in functions.php or as a mu-plugin):

<?php

/*
 * CUSTOM GLOBAL VARIABLES
 */
function wtnerd_global_vars() {
@freshway
freshway / full.php
Created September 15, 2020 18:13 — forked from ManojKiranA/full.php
Inertia Js Paginate
Route::get('/', function (\Illuminate\Http\Request $request) {
$initialSearch = $request->query('search', '');
$userQuery = User::query()
->when($request->filled('search'),function($query) use ($initialSearch){
$query->where('name','LIKE','%'.$initialSearch.'%')
->orWhere('email','LIKE','%'.$initialSearch.'%');
});
@freshway
freshway / !NOTE.md
Created May 7, 2020 15:40 — forked from mehranhadidi/!NOTE.md
Setup a Laravel Storage driver with Google Drive API