This file contains hidden or 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
//https://github.com/laracasts/Vue-Forms/blob/master/public/js/app.js | |
class Errors { | |
/** | |
* Create a new Errors instance. | |
*/ | |
constructor() { | |
this.errors = {}; | |
} | |
This file contains hidden or 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
<script> | |
import Form from '../../../libraries/form.js'; | |
export default { | |
created() { | |
if ( !Object.keys(this.$store.getters.businesses).length ) | |
this.$store.dispatch('getBusinesses') | |
}, | |
data() { | |
return { |
This file contains hidden or 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
// inside boot() | |
resolve(EngineManager::class)->extend('elasticsearch', function () { | |
return new ElasticsearchEngine(ClientBuilder::fromConfig(config('scout.elasticsearch.config')), config('scout.elasticsearch.index')); | |
}); |
This file contains hidden or 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
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; |
This file contains hidden or 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
// 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) => { |
This file contains hidden or 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\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; |
This file contains hidden or 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 | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
class CreateUserProvidersTable extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* |
This file contains hidden or 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 | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
class CreateUsersTable extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* |
This file contains hidden or 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 | |
use Geocoder\Model\Coordinates; | |
use GuzzleHttp\Client as HttpClient; | |
/** | |
* Class GeoLocation | |
*/ | |
class GeoLocation implements Contracts\GeoLocation |
This file contains hidden or 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
cat > /etc/apt/apt.conf.d/50unattended-upgrades << EOF | |
Unattended-Upgrade::Allowed-Origins { | |
"Ubuntu xenial-security"; | |
}; | |
Unattended-Upgrade::Package-Blacklist { | |
// | |
}; | |
EOF | |
cat > /etc/apt/apt.conf.d/10periodic << EOF |