Skip to content

Instantly share code, notes, and snippets.

Available for Hire

Dan Alvidrez bayareawebpro

Available for Hire
  • Freedom, California
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

JsonStore (Persistent Json Collection)

$json = Json::make(storage_path('framework/testing/json-test.json'));
$json->data->put('key', true);
View DumpAutoloadCommand.php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Foundation\Composer;
class DumpAutoload extends Command
View v-form-component.vue
import {
} from './mixins/index'
export default {
name: 'v-form',
View UniversallyUnique.php
<?php declare(strict_types=1);
namespace App\Traits;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
trait UniversallyUnique{
* Set Incrementing
View AbstractFormField.vue
import HasErrors from '../../mixins/HasErrors'
import TitleCase from "../../mixins/TitleCase"
export default {
mixins: [HasErrors, TitleCase],
return {
propValue: this.value,
View PusherApi.php
<?php namespace App;
use Pusher\Pusher;
* The Pusher Api Class
* (not implemented yet)
class PusherApi
protected $pusher;
View online.php
* Pusher API: User Online Status
* Not Implemented (may need for future use)
Route::any('online', function(Request $request){
/** @var $pusher \App\PusherApi */
$pusher = app()->make('pusherApi');
$channel = $request->get('channel', 'presence-App.Job.9');
$user_id = $request->get('user_id', 2);
View broadcasting.vue
export default {
name: 'broadcasting',
data() {
return {
broadcasting: this.$broadcasting
computed: {
...mapState('auth', {
currentUser: (state) => state.currentUser,
View gist:57f25956f187139cd8a2115f3b5a2eeb
Detect users Timezone from javascript
We have awesome library moment.js in JS world which can do all sorts of things with time, parse, validate, manipulate, and display dates and times in any formatting, it has also support to handle the timezone.
Pull the following in libraries:
<script src=""></script>
<script src=""></script>
Now if you check you chrome developer console you will have access to following methods provided by moment.
You can’t perform that action at this time.