Skip to content

Instantly share code, notes, and snippets.

<?php
use Geocoder\Model\Coordinates;
use GuzzleHttp\Client as HttpClient;
/**
* Class GeoLocation
*/
class GeoLocation implements Contracts\GeoLocation
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUserProvidersTable extends Migration
{
/**
* Run the migrations.
*
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Models\NotificationProvider;
use App\Models\RepositoryProvider;
use App\Models\Server\Provider\ServerProvider;
use App\Models\User\User;
use App\Models\User\UserLoginProvider;
@lukepolo
lukepolo / UserStore.js
Last active November 5, 2018 21:09
Vuex Sample - read filename inside of the file
// store/modules/user/UserStore.js
export default {
state: {
user: user,
},
actions: {
getCurrentUser : ({commit}) => {
Vue.http.get(Vue.action('User\UserController@index')).then((response) => {
commit('SET_USER', response.data);
}, (errors) => {
router.afterEach((to, from) => {
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
// inside boot()
resolve(EngineManager::class)->extend('elasticsearch', function () {
return new ElasticsearchEngine(ClientBuilder::fromConfig(config('scout.elasticsearch.config')), config('scout.elasticsearch.index'));
});
<script>
import Form from '../../../libraries/form.js';
export default {
created() {
if ( !Object.keys(this.$store.getters.businesses).length )
this.$store.dispatch('getBusinesses')
},
data() {
return {
@lukepolo
lukepolo / Error.js
Last active February 28, 2017 16:00
Helper Classes for Vue.js / Vuex / Vue-Router
//https://github.com/laracasts/Vue-Forms/blob/master/public/js/app.js
class Errors {
/**
* Create a new Errors instance.
*/
constructor() {
this.errors = {};
}
{
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --progress --hide-modules",
"watch": "cross-env NODE_ENV=development webpack --watch --progress --hide-modules",
"hmr": "cross-env NODE_ENV=development webpack-dev-server --inline --hot",
"production": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"devDependencies": {
"cross-env": "^3.1.4",