Skip to content

Instantly share code, notes, and snippets.

View zach2825's full-sized avatar

The Zach zach2825

View GitHub Profile
<?php namespace App;
use Illuminate\Database\Eloquent\Model;
class BaseModel extends Model
{
/**
* @description
* @author [email protected]
* @param $name
* @param $type
* @param string $default_value
@zach2825
zach2825 / field.blade.php
Created September 28, 2015 21:14
Meant to be a field sample
<div class="form-group">
<label for="FieldNameHere" class="form-label">Field Label Here</label>
{!! Form::text('FieldNameHere', null, ['class'=>'form-control', 'placeholder' => 'Field Label Here']) !!}
{!! $errors->first('FieldNameHere', '<span class="help-block">:message</span>') !!}
</div>{{-- end FieldNameHere --}}
@zach2825
zach2825 / keypressAction.js
Created September 30, 2015 18:07
keypressAction.js
;(function ( $, window, document, undefined ) {
var pluginName = "keypressAction",
defaults = {};
// The actual plugin constructor
function keypressAction ( element, options ) {
this.element = element;
this.settings = $.extend( {}, defaults, options );
this._defaults = defaults;
this._name = pluginName;
@zach2825
zach2825 / rvm info
Created February 16, 2016 23:26
rvm info
ruby-2.0.0-p643:
system:
uname: "Linux turtlebytes 3.13.0-76-generic #120-Ubuntu SMP Mon Jan 18 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux"
system: "ubuntu/14.04/x86_64"
bash: "/bin/bash => GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.26.11 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]"
@zach2825
zach2825 / some ruby info
Created February 16, 2016 23:34
ruby info
ruby --version
ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux-gnu]
but when i try to run bundle install i get this error
Installing prawn 2.0.2
Gem::InstallError: prawn requires Ruby version >= 2.0.0.
but you can see that im using 2.0.0p648 i cannot figure out why it will not use the new ruby version
<?php namespace App\Traits;
use Carbon\Carbon;
trait BaseModelTrait
{
protected $attrs_json = null;
/**
{{--
Author: Zach Robicahud
Company: Turtlebytes LLC
Email: [email protected]
Description: This file utilizes toastr. To generate a beautiful popup message generated using Session::flash
Reference link: http://codeseven.github.io/toastr/demo.html
--}}
@if ($message = Session::get('success'))
@if (Session::has('flash_notification.message'))
@if (Session::has('flash_notification.overlay'))
@include('flash::modal', ['modalClass' => 'flash-modal', 'title' => Session::get('flash_notification.title'), 'body' => Session::get('flash_notification.message')])
@else
@if(Session::get('flash_notification.level') == 'danger')
<script> toastr.error('{{ Session::get('flash_notification.message') }}')</script>
@else
<script> toastr.{{ Session::get('flash_notification.level') }}('{{ Session::get('flash_notification.message') }}')</script>
@endif
{{--<div class="alert alert-{{ Session::get('flash_notification.level') }}">--}}
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
@zach2825
zach2825 / Articolo.php
Last active August 26, 2019 15:56 — forked from riccardopirani/Articolo.php
Display select values with Laravel
public function GetArticoli($IdUtente)
{
// if you have a Articolo model.
$articoli = App\Articolo::where('IdUtente', '=', $IdUtente)->get();
return view('gestionearticoli', compact('articoli'));
}