Skip to content

Instantly share code, notes, and snippets.

View shanerbaner82's full-sized avatar
🎯
Focusing

Shane Rosenthal shanerbaner82

🎯
Focusing
View GitHub Profile
@shanerbaner82
shanerbaner82 / ShopifyFulfillmentCatchAll.php
Created September 9, 2019 17:55
Modified to retroactively fulfill orders
<?php
namespace App\Console\Commands;
use App\Models\Order;
use App\Models\xcart\ShopifyAPI;
use Carbon\Carbon;
use Exception;
use GuzzleHttp\RequestOptions;
use Illuminate\Console\Command;
@shanerbaner82
shanerbaner82 / Who are you? The validation story.
Last active March 29, 2020 21:32
Who are you? The validation story.
Validation is a way to ensure that the data submitted from your front end forms or requests meets your expectations and ensures that we are storing the right data in our database. When a form or request is submitted, before we run any logic with that data we need to make sure it has meet all of our requirements. If the data does not meet our requirements, we need to tell the user there is a problem with the data they submitted so they can fix it.
### The Project
Currently I am working on a SAAS app called SavvyHouseHunting.com - it is a platform that allows real estate agents to create and share 360 videos and images, documents and messages with their clients. One of the key differences with this application is that it is a Vue SPA, leveraging Vue Router, so we aren't able to use the Blade helper `@errors` as we would in a blade view.
In one area of the site users of certain types are allowed to "invite" people to join their team, upon receiving the invitation the user needs to provide some basic user data
@shanerbaner82
shanerbaner82 / button-spin-animation.html
Created July 30, 2020 02:42
Using Tailwinds new Animate properties and AlineJS to trigger
<button x-data="{spin: false}" type="submit" @click="spin=true"
class="inline-flex items-center px-3 py-2 border border-transparent text-base leading-4 font-medium rounded-md text-white bg-green-400 hover:bg-green-500 focus:outline-none focus:border-green-700 focus:shadow-outline-indigo active:bg-green-700 transition ease-in-out duration-150">
<svg x-show="spin" class="animate-spin -ml-1 mr-3 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor"stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor"d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
Send Invitation
</button>
const { colors } = require('tailwindcss/defaultTheme');
module.exports = {
prefix: 'tw-',
important: true,
shadowLookup: true,
purge: {
content: [
'./resources/views/**/*.blade.php',
'./resources/assets/js/**/*.vue',
],
@shanerbaner82
shanerbaner82 / composer.lock
Created August 14, 2020 20:25
feature-wayt-less lock
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e042667e6343db64acabadcade3bb2ed",
"packages": [
{
"name": "algolia/algoliasearch-client-php",
@shanerbaner82
shanerbaner82 / main.yml
Created October 2, 2020 17:54
Laravel Github Actions YAML
name: APP NAME
on:
pull_request:
branches: [ branches ]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_URL }}
jobs:
tests:
runs-on: ubuntu-latest
name: Tests
<?php
namespace Tests\Feature;
use App\Models\Country;
use App\Models\Order;
use App\Models\Subscription;
use App\Models\User;
use App\Models\UserAddress;
use App\Utils\AtollaAPIFacade;
@shanerbaner82
shanerbaner82 / composer.json
Created November 22, 2020 20:15
Statamic composer statamic composer
,
"@php artisan statamic:install --ansi"
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
<!DOCTYPE html>
<html lang="en">
<head>
<title>
@yield('title')
</title>
<!-- META -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=11"/>