Skip to content

Instantly share code, notes, and snippets.

View bedus-creation's full-sized avatar
🎯
Focusing

Bedram Tamang bedus-creation

🎯
Focusing
View GitHub Profile
@bedus-creation
bedus-creation / EmailTest.php
Created June 12, 2019 10:30
Test email queued in laravel application. This particular gist test the email is queued to jobseeker and company user when jobseeker applied to the jobs.
public function email_is_sent_when_job_applied()
{
Mail::fake();
$this->be(cUser('jobseeker'));
$data = $this->getData();
$this->post('job/applyjobs', $data);
$company = User::find($data["company_id"]);
Mail::assertQueued(JobAppliedEmail::class, 2);
Mail::assertQueued(JobAppliedEmail::class, function ($email) {
return $email->to(auth()->user()->email);
@bedus-creation
bedus-creation / Chart.vue
Last active June 5, 2019 10:10
Setup chart Js in vue
<template>
<canvas :id="id"></canvas>
</template>
<script>
import Chart from 'chart.js';
import planetChartData from '../../../../data/chart-data.js';
export default{
props:["id"],
data(){
return {
@bedus-creation
bedus-creation / config.js
Created April 14, 2019 17:32
SummerNote Confg
var configSummernote = {
placeholder: 'Details goes here',
toolbar: [
['style', ['style']],
['fontsize', ['fontsize']],
['font', ['bold', 'italic', 'underline','font', 'strikethrough', 'superscript', 'subscript']],
['fontname', ['fontname']],
// ['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
@bedus-creation
bedus-creation / gist:2afd28139008dc5a989807dc88c27bac
Created April 10, 2019 19:56
DD laravel database current COnfig
dd(DB::connection()->getConfig(null));
@bedus-creation
bedus-creation / key_binding.json
Last active March 13, 2019 06:03
Vscode settings for laravel
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+l",
"command": "better-phpunit.run"
},
{
"key": "cmd+k cmd+p",
"command": "better-phpunit.run-previous"
}
@bedus-creation
bedus-creation / YoutubePlayList.vue
Last active November 25, 2018 10:37
play list and video player
<template>
<div class="row" id="youtube">
<div class="col-md-8 pr-md-0 bg-night pt-2 pb-2">
<div v-if="loading" class="loading w-100" height="400">
<div></div>
</div>
<iframe @load="loading=false" width="100%" height="400" :src="activeUrl" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
</iframe>
</div>
<div class="col-md-4 pl-md-0 bg-night pt-2 pb-2">
@bedus-creation
bedus-creation / CreatesApplication.php
Created November 21, 2018 06:16
Force Sqlite in laravel Testing by setting up config in CreatesApplication.php
<?php
namespace Tests;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Support\Facades\Hash;
trait CreatesApplication
{
/**
@bedus-creation
bedus-creation / text.blade.php
Last active November 14, 2018 07:56
use config in laravel to set page layout with vue
<ul>
@foreach($setting['mainMenu'] as $menu)
<a href="{{$menu['url']}}"><li> {{$menu['label']}}</li></a>
@endforeach
</ul>
<{{$setting['layout']['page']['home']['component']}} category="{{$setting['layout']['page']['home']['category']}}">