Skip to content

Instantly share code, notes, and snippets.

View marcellorg's full-sized avatar

marcellorg

  • São Paulo, Brasil
View GitHub Profile
@marcellorg
marcellorg / CatsController.php
Created June 1, 2016 06:10
Modelo controller
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Danbru\Http\Requests;
use Prettus\Validator\Contracts\ValidatorInterface;
use Prettus\Validator\Exceptions\ValidatorException;
use Danbru\Http\Requests\CatCreateRequest;
import Vue from 'vue';
import VueResource from 'vue-resource';
import VueGridCategory from '../components/gridCategory.vue';
Vue.use(VueResource);
new Vue({
el: '#vueCategory',
@extends(
'admin.base',
[
'title' => 'Categorias',
'pageTitle' => 'Categorias',
'breadCrumb' => ['Categorias']
]
)
@section('page-content')
<template>
<div class="row cstToolBar">
<div class="col-sm-10 table-toolbar-left" >
<button class="btn btn-primary btn-labeled fa fa-plus" type="button">Nova Categoria</button>
</div>
<div class="col-sm-2 table-toolbar-right">
<div class="input-group">
<input type="text" class="form-control" placeholder="Filtrar" v-model="filterTerm" v-on:keyup.enter="search">
<template>
<div class="row bord-top" style="border-top: 2px solid #e9e9e9">
<div class="col-sm-6 ">
<p style="margin-top:10px">Exibindo {{source.from}} até {{source.to}} de {{source.total}} registros</p>
</div>
<div class="col-sm-6 text-right">
<nav>
<ul class="pagination" style="margin: 10px 0">
<li v-bind:class="{disabled: source.current_page == 1}">
<?php
namespace Codecasts\Core\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class RedirectIfWrongUrlOrProtocol
{
/** @var Request */
var gulp = require('gulp');
var plumber = require('gulp-plumber');
var sass = require('gulp-sass');
var watch = require('gulp-watch');
var concat = require('gulp-concat');
var gulpif = require('gulp-if');
var cssnano = require('gulp-cssnano');
var imagemin = require('gulp-imagemin');
var uglify = require('gulp-uglify');
var rimraf = require('gulp-rimraf');
const { mix } = require('laravel-mix');
mix.js('resources/assets/js/app.js', 'public/js')
.extract(['jquery','tether','bootstrap'])
.autoload({
jquery: ['$', 'window.jQuery', 'jQuery', 'jquery'],
tether: ['Tether', 'window.Tether']
})
{
"name": "understrap",
"version": "0.6.2",
"description": "Wordpress Theme framework",
"main": "index.js",
"scripts": {
"postinstall": "gulp copy-assets"
},
"engines": {
"npm": ">=2.1.8"
gulp.task('scss', function() {
var source = gulp.src('sources/sass/theme.scss')
.pipe(plumber())
.pipe(sourcemaps.init())
.pipe(sass());
var pipe1 = source.pipe(clone())
.pipe(sourcemaps.write('.'))
// .pipe(rename('custom-editor-style.css'))
.pipe(gulp.dest('css'))