Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Rohan Krishna rohan-krishna

💭
I may be slow to respond.
View GitHub Profile
@rohan-krishna
rohan-krishna / cors-nginx.conf
Created Jul 24, 2020 — forked from michiel/cors-nginx.conf
Wide-open CORS config for nginx
View cors-nginx.conf
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@rohan-krishna
rohan-krishna / create_tasks_table.php
Last active Dec 27, 2018
1375144f4718_tasks_migration_final
View create_tasks_table.php
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTasksTable extends Migration
{
/**
* Run the migrations.
View create_tasks_table.php
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTasksTable extends Migration
{
/**
* Run the migrations.
View ProductFilter.php
<?php
namespace app;
use app\Product;
use Carbon\Carbon;
class ProductFilter extends QueryFilter {
public function
@rohan-krishna
rohan-krishna / QueryFilter.php
Created Apr 27, 2018
Laravel 5 — How to build multiple Query Filters for Eloquent Model
View QueryFilter.php
<?php
namespace app;
use Illuminate\Http\Request;
use Illuminate\Database\Eloquent\Builder;
abstract class QueryFilter
{
protected $request;
protected $builder;
View Visual Studio Code Settings For Laravel
{
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"editor.formatOnPaste": true,
"editor.fontFamily" : "Fira Code",
"editor.fontLigatures": true,
"emmet.triggerExpansionOnTab": true,
"php.suggest.basic": false,
"editor.autoIndent": true,
"emmet.includeLanguages" : {
@rohan-krishna
rohan-krishna / index.html
Created Jul 5, 2016
Vue.js Event Handling
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue.js Event Handing</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.js"></script>
</head>
<body>
<div id="app">
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue.js</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.js"></script>
</head>
<body>
<div id="app">
<h1>Hello {{ message }}</h1>
@rohan-krishna
rohan-krishna / index.html
Created Jun 16, 2016
Another index.html continuation for Vue.js Intro
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue.js</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.js"></script>
</head>
<body>
<div id="app">
<h1>{{ message }}</h1>
@rohan-krishna
rohan-krishna / index.html
Created Jun 16, 2016
Continuation of Vue.js Intro
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue.js</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.js"></script>
</head>
<body>
<div id="app"></div>
<script>
You can’t perform that action at this time.