Skip to content

Instantly share code, notes, and snippets.

🤖
Building...

Dan Alvidrez bayareawebpro

🤖
Building...
Block or report user

Report or block bayareawebpro

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
@bayareawebpro
bayareawebpro / laravel-bitbucket-pipelines.yml
Last active Mar 26, 2020
Bitbucket Pipelines for Laravel
View laravel-bitbucket-pipelines.yml
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# You can specify a custom docker image from Docker Hub as your build environment.
# run composer check-platform-reqs for a list of required extensions.
image: php:7.2-fpm
pipelines:
default:
# Not needed unless you're doing feature tests.
# - step:
View Resourceable.php
<?php
namespace App\Concerns;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
trait Resourceable
{
public function toResourceArray(?string $class = null, ?Request $request = null): array
View TrackAffiliates.php
<?php namespace App\Http\Middleware;
use App\Affiliate;
use App\Referral;
use Closure;
use Cookie;
class TrackAffiliates
{
/**
* Run the request filter.
*
View AutoLoader.md

Registering Providers (within application.js)

// Services/VueServiceProvider.js

this.load(require.context('./Services', true, /\.*ServiceProvider.js$/))
    .each((name, abstract) => this.register(abstract))

Binding Middleware

View laravel-worker-websockets-supervisor.conf
[program:provisioner-worker]
process_name=%(program_name)s
command=php /Users/builder/Sites/provisioner/artisan horizon
stdout_logfile=/Users/builder/Sites/provisioner/storage/logs/worker.log
redirect_stderr=true
autorestart=true
autostart=true
user=builder
[program:provisioner-websockets]
View askBeforeLeaving.js
<script>
window.addEventListener('beforeunload', function (e) {
// Cancel the event
e.preventDefault();
// Chrome requires returnValue to be set
e.returnValue = '';
// This message may not be shown to the user / vendor specific message may be used...
window.confirm("Are you sure?");
});
</script>
View FormControl.md

Usage

<v-form-control
    type="text"
    name="name"
    label="Name"
    v-model="entity.name"
    @change="isInvalid = false"
    :invalid="isInvalid"
View ApiClient.php
<?php declare(strict_types=1);
namespace App\Services;
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Response;
use GuzzleHttp\RequestOptions;
use GuzzleHttp\Exception\RequestException;
class ApiClient
View StripeApi.php
/** START EXAMPLES **/
<?php
/**
* Split Payment
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
* @throws \Exception
View Editor.vue
<script>
/**
* @property validator
**/
import Ace from "ace-builds/src-noconflict/ace";
import "ace-builds/webpack-resolver";
export default {
props: {
value: {
You can’t perform that action at this time.