Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergi Tur Badenas acacha

View GitHub Profile
View adminlte_boxes.css
// Box color variations
&.box-primary {
border-top-color: @light-blue;
}
&.box-info {
border-top-color: @aqua;
}
&.box-danger {
border-top-color: @red;
}
@acacha
acacha / adminlte_vue_box_component_example1.html
Created Jun 15, 2017
Adminlte vue cox component example
View adminlte_vue_box_component_example1.html
<adminlte-vue-box color='primary'></adminlte-vue-box>
View example_setting_initial_data_values_thought_props_in_vue.js
<script>
export default {
data() {
return {
isCollapsed : this.collapsed,
isRemovable: this.removable,
isSolid: this.solid,
}
},
...
View adminlte_box_title_as_prop_wrong_example.html
<adminlte-vue-box title="My title box"></adminlte-vue-box>
@acacha
acacha / default_slot.html
Created Jun 16, 2017
Default slot example on vue.js
View default_slot.html
<adminlte-vue-box>Here the body content it could be simple text or HTML code!</adminlte-vue-box>
@acacha
acacha / vue_example_using_cunstom_events_on_components.html
Last active Jun 19, 2017
Vue example using custom events on components
View vue_example_using_cunstom_events_on_components.html
<adminlte-vue-box v-on:removed="onRemoved"></adminlte-vue-box>
@acacha
acacha / watchers_with_vue_component_props.html
Created Jun 19, 2017
Using watcher with vue component props
View watchers_with_vue_component_props.html
watch: {
collapsed: function () {
this.isCollapsed= this.collapsed
},
...
}
@acacha
acacha / example_of_vue_methods.js
Created Jun 19, 2017
example_of_vue_methods.js
View example_of_vue_methods.js
methods: {
remove() {
this.removed = true
this.$emmit('removed')
}
}
@acacha
acacha / example_using_watcher_vue_to_fire_events.js
Last active Jun 19, 2017
example_using_watcher_vue_to_fire_events.js
View example_using_watcher_vue_to_fire_events.js
watch: {
removed: function () {
removed ? this.$emmit('removed') : this.$emmit('unremoved')
}
},
@acacha
acacha / check_connection_helper_for_laravel.php
Created Jun 20, 2017
A helper for checking connection on Laravel.
View check_connection_helper_for_laravel.php
if (!function_exists('check_connection')) {
/**
* Check database connection.
*
* @param $connection
* @return bool
*/
function check_connection($connection)
{
try {