Skip to content

Instantly share code, notes, and snippets.

@ginsengs
ginsengs / Auth.vue
Created February 22, 2017 07:57
auth-vue-used Route_index.js - route/index.js
<template>
<div class=" col-md-6 ">
<br>
<div class="panel panel-default">
<div class="panel-heading">Авторизация</div>
<div class="panel-body">
<div class="form-group">
<label>Логин</label>
<input v-model="body.email" class="form-control" type="text">
</div>
@ginsengs
ginsengs / RouteCollection
Last active March 6, 2017 12:35
Example RouteCollection
public static function get($url, $controllerAndAction, $option)
{
self::parseOptions()
self::add(...)
}
protected static function parseOptions($options){
...
}
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
console.log('test2')
reader.onload = function (e) {
$('#image-view').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
@ginsengs
ginsengs / Cart.php
Created March 24, 2017 20:44
Simple Laravel Cart
<?php
namespace App\Models;
use App\Models\Product\Product;
use Illuminate\Support\Facades\Session;
class Cart
{
@ginsengs
ginsengs / auto.php
Last active March 26, 2017 16:22
AutoCollection and Auto class,interface,abstract
<?php
interface AutoInterface
{
public function __construct($marka, $type);
public function getMarka();
public function getType();
}
<?php
class Tumba
{
protected $box = [];
function __construct($yashik)
{
for ($i = 0; $i < $yashik; $i++) {
@ginsengs
ginsengs / .babelrc
Created June 15, 2017 21:06
VueJS Laravel
{
"presets": ["es2015", "stage-2"]
}
@ginsengs
ginsengs / gist:4988081d513d7254e1b559ab8d036fdf
Created July 30, 2017 21:56
Init Symphony on LaravelHomstead(simple)
1.
homstead.yaml
....
to: pathSymfony/web
2.
rename /web/app_dev.php to /web/index.php
View headers of request -
curl -I site.com
[
'id' => 3,
'teams' => [
[
'players' => [
235235233,
763435235
],
'winner' => true