Skip to content

Instantly share code, notes, and snippets.

View Valonix's full-sized avatar

Valeriy Donika Valonix

View GitHub Profile
@Valonix
Valonix / cart.directive.js
Created January 10, 2017 09:40
Cart directives for e-commerce
'use strict';
angular.
module('core.cart').
directive('addtoCart', ['Cart','$timeout', function(Cart, $timeout){
return {
restrict: 'E',
transclude: true,
scope: {
id:'@',
@Valonix
Valonix / product-detail.component.js
Created January 10, 2017 09:35
Angular 1.5x Product Detail Page
'use strict';
(function () {
'use strict';
angular.module('productDetail').component('productDetail', {
templateUrl: 'views/app/product-detail/product-detail.template.html',
bindings: {
item: '='
},
@Valonix
Valonix / SitemapController.php
Created January 10, 2017 09:32
SitemapController
<?php
namespace App\Http\Controllers;
use App\Category;
use Sitemap;
use App\Product;
class SitemapController extends Controller
@Valonix
Valonix / ProductController.php
Created January 10, 2017 09:29
Laravel 5.2 Admin Controller
<?php
namespace App\Http\Controllers\Admin;
use App\Manufacturer;
use App\Category;
use App\Product;
use App\ProductImage;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;