This file contains 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> | |
export default { | |
data: () => ({ | |
form: { | |
id: 1 | |
text: 'ABC' | |
} | |
}), | |
watch:{ | |
'form.id': function (newVal, oldVal){ |
This file contains 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
describe 'Race condition POST /api/v1/transaction/electricity', vcr: { cassette_name: 'race_condition_transaction_electricity' } do | |
it { expect(ActiveRecord::Base.connection.pool.size).to eq(5) } | |
context 'send requests simultaneously' do | |
let!(:user) { create(:user, limit_credit: 500_000, balance: 60_000) } | |
it 'should create one transaction' do | |
begin | |
concurrency_level = 4 | |
fail_occurred = false |
This file contains 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
<template> | |
<ValidationProvider :rules="rules" :name="$attrs.label"> | |
<b-form-group slot-scope="{ valid, errors }" :label="$attrs.label" :invalid-feedback="errors[0]"> | |
<b-input | |
:state="errors[0] ? false : (valid ? true : null)" | |
:name="$attrs.label.toLowerCase()" | |
:type="$attrs.type" | |
:placeholder="$attrs.placeholder" | |
v-model="innerValue" /> | |
</b-form-group> |
This file contains 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 | |
... | |
/** | |
* A basic test example. | |
* | |
* @return void | |
*/ | |
public function testSearchPageResult() |
This file contains 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\Models; | |
use App\Models\Traits\Searchable; | |
use Illuminate\Database\Eloquent\Model; | |
class Customer extends Model | |
{ | |
use Searchable; |
This file contains 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
set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; | |
set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; |
This file contains 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
// app/Providers/AppServiceProvider.php | |
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use App\Services\FooApp\FooAppSocialite; | |
class AppServiceProvider extends ServiceProvider |
This file contains 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\Models\Traits; | |
use Carbon\Carbon; | |
trait DateFormater | |
{ | |
public function appDate($attribute, $format = null) | |
{ |
This file contains 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
<div> | |
<div class="container-fluid"> | |
<div class="row"> | |
<div class="col-md-8"> | |
<b-card class="mb-3"> | |
<b-form inline> | |
<label class="sr-only" for="inline-form-input-username">Cari Produk</label> | |
<b-input-group class="mb-2 mr-sm-2 mb-sm-0" size="lg" style="width: 50%"> | |
<b-input id="search-product" placeholder="Cari produk..."></b-input> | |
<b-input-group-append> |
This file contains 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
# Be sure to restart your server when you modify this file. | |
# Configure sensitive parameters which will be filtered from the log file. | |
Rails.application.config.filter_parameters += %i[ | |
passw password vendorable_id | |
] |