This file contains 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\Enums; | |
use BenSampo\Enum\FlaggedEnum; | |
final class Day extends FlaggedEnum | |
{ | |
const Monday = 1 << 0; | |
const Tuesday = 1 << 1; |
This file contains 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 | |
/** | |
* Pull and remove an element from an array | |
* | |
* @param array $array | |
* @param mixed $key | |
* @param mixed $default | |
* @return mixed | |
*/ | |
if (!function_exists('arrayPull')): |
This file contains 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 | |
... | |
/** | |
* Format date values for asserting database model existence | |
* | |
* @param string $table | |
* @param Model $model | |
* @param ?string $connection | |
* @return bool |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am joshuadoshua on github. | |
* I am joshuadoshua (https://keybase.io/joshuadoshua) on keybase. | |
* I have a public key ASC4_LHMJ3yfvo81T-Qb2qVXgkJXz-L1_zedluZjva_nYAo | |
To claim this, I am signing this object: |
This file contains 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
BEGIN:VCALENDAR | |
VERSION:2.0 | |
CALSCALE:GREGORIAN | |
METHOD:PUBLISH | |
BEGIN:VEVENT | |
DTSTART;VALUE=DATE:20210315 | |
DTEND;VALUE=DATE:20210316 | |
RRULE:FREQ=MONTHLY;BYMONTHDAY=13,14,15;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1 | |
LOCATION: | |
SEQUENCE:0 |
This file contains 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\Concerns; | |
use App\Models\Tag; | |
use App\Models\Taggable as TaggableMorph; | |
trait Taggable | |
{ | |
/** |
This file contains 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\Rules; | |
use Illuminate\Contracts\Validation\Rule; | |
class PasswordRequirementsRule implements Rule | |
{ | |
// @var string | |
//private $regex; |
This file contains 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\Console\Commands; | |
use Illuminate\Support\Str; | |
use Illuminate\Console\Command; | |
class MakeEntityCommand extends Command | |
{ | |
/** |
This file contains 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 | |
function squarecandy_add_to_gcal( | |
$name, | |
$startDate, | |
$endDate = false, | |
$isAllDay = false, | |
$description = null, | |
$location = null | |
) { |
This file contains 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
/** | |
* get previous/next post | |
* default WP postnav is limited | |
* modified from link below to handle post_type and cats differently | |
* | |
* @param string $direction [which direction to go] | |
* @param string $postTypes [what post types should w] | |
* @return [type] [description] | |
*/ | |
function my_adjacent_post($direction = 'prev', $inSameTax = false, $tax = null, $postTypes = null, $reverseTax = false) |