This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'deep_merge/rails_compat' | |
require 'yaml' | |
require 'yaml2csv' | |
require 'time' | |
def convert_csv_to_yaml input_file | |
hash = {} | |
file = File.read(input_file, encoding: 'bom|utf-8') | |
file.split("\n").each { |line| hash.deeper_merge!(line.gsub(/"\\"|"$/, " ").gsub(/""/,'"').chomp.split(/(?<!<)\/|;/).reverse.inject() { |m,v| {v => m} }) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if(isset($success) || Session::has('success') ) | |
<div class="alert alert-success alert-dismissable"> | |
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | |
<strong>Success!</strong> {{ isset($success) ? $info : Session::get('success') }} | |
</div> | |
@endif | |
@if(isset($error) || Session::has('error') ) | |
<div class="alert alert-danger alert-dismissable"> | |
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($errors->has($field) ): | |
echo "<div class='form-group has-error has-feedback'>"; | |
elseif ( Input::old($field) && ! $errors->has($field) ): | |
echo "<div class='form-group has-success has-feedback'>"; | |
else: | |
echo "<div class='form-group'>"; | |
endif; | |
?> | |
{{ Form::label($field, trans($context.'.'.$field)) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register all of the routes for an application. | |
| It's a breeze. Simply tell Laravel the URIs it should respond to | |
| and give it the Closure to execute when that URI is requested. |