Skip to content

Instantly share code, notes, and snippets.

View rohan-krishna's full-sized avatar
👻
I may be slow to respond.

Rohan Krishna rohan-krishna

👻
I may be slow to respond.
View GitHub Profile
@rohan-krishna
rohan-krishna / .env
Last active January 18, 2016 09:35
Laravel CRUD .env
APP_ENV=local
APP_DEBUG=true
APP_KEY=UdZnGpuM2DlhceUOz7NT34qyqnjYnG6t
DB_HOST=localhost
DB_DATABASE=superheroes
DB_USERNAME=root
DB_PASSWORD=
CACHE_DRIVER=file
// Command to start a new Ionic App
ionic start blank marsWeather
@rohan-krishna
rohan-krishna / index.html
Last active April 10, 2016 05:57
Angular HelloWorld Index.html
<!DOCTYPE html>
<html>
<head>
<title>AngularJS HelloWorld</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
<body ng-app="">
<div class="container">
@rohan-krishna
rohan-krishna / index.html
Created June 16, 2016 18:04
Vue.js Introduction Tutorial <index>
<!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>
</body>
@rohan-krishna
rohan-krishna / index.html
Created June 16, 2016 18:12
Continuation of Vue.js Intro
<!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>
@rohan-krishna
rohan-krishna / index.html
Created June 16, 2016 18:18
Another index.html continuation for Vue.js Intro
<!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>
<!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 July 5, 2016 07:12
Vue.js Event Handling
<!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">
@rohan-krishna
rohan-krishna / QueryFilter.php
Created April 27, 2018 04:36
Laravel 5 — How to build multiple Query Filters for Eloquent Model
<?php
namespace app;
use Illuminate\Http\Request;
use Illuminate\Database\Eloquent\Builder;
abstract class QueryFilter
{
protected $request;
protected $builder;
<?php
namespace app;
use app\Product;
use Carbon\Carbon;
class ProductFilter extends QueryFilter {
public function