Skip to content

Instantly share code, notes, and snippets.

View ashishakya's full-sized avatar
🏠
Working from home

Ashish Shakya ashishakya

🏠
Working from home
  • YoungInnovations
  • Kumaripati
View GitHub Profile
@ashishakya
ashishakya / gist:a2b54ed911c8b6c509b547be4abcd0c7
Created August 20, 2020 03:43
Forget password steps in laravel
Forgot password:
1. click forgot password
2. Fill out a form with their email address
3. prepare a unique token and associate it with the user's account
4. Send an email with a unique link back to our site that confirms email ownership
5. Link back to website, confirm the token, and set a new password.
<template>
<div>
<div>
<h2>Search and add a marker</h2>
<label>
<gmap-autocomplete
@place_changed="setPlace"/>
</label>
<br>
</div>
@ashishakya
ashishakya / LeafletMapMarker.vue
Last active July 13, 2020 03:38
Leaflet map marker
<template>
<div>
<l-map style="height: 350px"
:zoom="zoom"
:center="center"
@click="handleClick"
@ready="ready">
<l-tile-layer :url="url"/>
<l-marker :lat-lng="markerLatLng"/>
</l-map>
@ashishakya
ashishakya / Edit.vue
Created July 5, 2020 17:06
Vue Custom TimePicker
<TimePicker id="endTime"
v-model="formData.end_time"/>
@ashishakya
ashishakya / Create.vue
Last active July 3, 2020 17:14
Vue MultiSelect
<VueMultiSelect :options="beneficiaries"
placeholder="दर्ता समूह/व्यक्ति छान्नुहोस्"
v-model="formData.recipients"/>
@ashishakya
ashishakya / App.js
Last active July 4, 2020 16:59
Vue component for text Editor
<template>
<VueTextEditor v-model="formData.content"/>
</template>
@ashishakya
ashishakya / Create.vue
Created June 27, 2020 05:59
Vuu tag input
<VueTagInput v-model="formData.metadata.amenities"
:default-tags="amenitiesList"
tag-placeholder="Add this as new amenity"
placeholder="Search or add a amenity"/>
@ashishakya
ashishakya / ES6-class.js
Created June 10, 2020 15:37
Js Best practise
// Old
var Meal = function(food){
this.food = food
}
Mean.prototype.eat = function(){
return 'pizza'
}
// New
@ashishakya
ashishakya / BaseRepository.php
Created May 30, 2020 05:49
Repository Pattern in Laravel
<?php
namespace App\SOSC\Repositories;
use Exception;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
/**
@ashishakya
ashishakya / AuthController.php
Last active May 28, 2020 07:48
JWT Setup for laravel
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class AuthController extends Controller
{
/**