Posts by Hula Hula • 457 points
18 posts
-
0
votes1
answer44
viewsA: Ager loading and custom queries
I managed to solve thanks to a colleague in the SO EN: In my Model Freguesia: ... public function current_weather() { $f_key = 'id_freg'; return $this->hasOne(\App\Weather::class, $f_key)…
-
0
votes1
answer44
viewsQ: Ager loading and custom queries
This question is a follow up of this and of this. But I’ll try to make them independent. I have the following tables, weathers: +--------+-------+---------+ | id | temp | id_freg |…
-
0
votes1
answer1888
viewsQ: Counter up to a specific number
I have three counters, which go up to a certain number, set in data-count-to of each tag, my problem here is that I would like them to reach their limit at the same time, even with values as…
-
2
votes1
answer616
views -
1
votes1
answer422
viewsQ: ORDER BY in string date
I have a table in the database, novidades, where I have a column with the name date is being stored as a string in the format dd-mm-yyyy, but I would like to sort by date based on this value, I…
-
2
votes2
answers157
viewsA: Change view/component but not URL
I also made this question in so en, and the answer I got was this, it turns out, although I don’t know if it’s 'well done': let route = this.$router.match({ name: '404' });…
-
5
votes2
answers157
viewsQ: Change view/component but not URL
I’m working on a page 404, work well, I have the following: const router = new VueRouter({ routes: [ // ... { path: '*', component: NotFound, name: '404', meta: {page_title: '404 NOT FOUND'} }, ]…
-
3
votes2
answers874
viewsQ: Select specific columns from two related tables
I have an N x 1 relationship, Post x User, have a relationship like the following: Post.php (model): .... public function user() { return $this->belongsTo('User'); } .... What I want is to select…
-
2
votes2
answers71
viewsQ: 'Delay' in the attribution/existence of properties in the Vue instance
I have the following code: Vue.component('child-comp', { template: '<p>Child here</p>', props: ['item'], methods: { alt: function(msg) { alert(msg); } } }); new Vue({ el: '#app', data()…
-
3
votes1
answer103
viewsQ: Dynamic slot value
I would like to know how I make the slots content dynamic, in this case with the name/value of the product. What I got is: // register modal component Vue.component('modal', { template: '#modal' })…
-
1
votes2
answers372
viewsQ: "Nothing to commit" after failed authentication
I have a question about git. Namely when we failed to authenticate, the commands and actions I took were: Change in ficheiro.c commando git add . commando git commit -am 'lol' && git push…
-
3
votes1
answer196
viewsQ: Concatenate multiple Sass/css files into one final css
I am using Laravel 5.4, which by default brings a file webpack.mix.js which will be the files to be concatenated and their destination. My problem is concatenating files scss with css, what I have…
-
2
votes1
answer88
viewsQ: Event delegation only once, in a 'dynamic' scenario
I have a function hello() whose argument is the return of an ajax call: function hello(msg) { alert(msg); } $.ajax({ url: 'example.com', data: data }).done(function(resp) { // abre_modal // apenas…
-
0
votes2
answers466
viewsA: Passing parameters, he.on('click', func);
I got it this way, I don’t know if it’s right but: function hello(msg) { alert(msg); } $('ele').on('click', function() { hello('hello') }); function hello(msg) { alert(msg); }…
-
2
votes2
answers466
viewsQ: Passing parameters, he.on('click', func);
How do I get past parameters the following way? function hello(msg) { alert(msg); } $('ele').on('click', hello); How can I pass the msg for the function hello(); The alternative with native…
-
3
votes2
answers5347
viewsQ: Know how many years, months, days, hours, etc have passed since a certain date
I would like to know how do I make the output of the difference between two dates stay the way I want, in this case I would like it to be: Since 16 - 07 - 2014 23:00:00 passed: X years, Y months, K…
-
2
votes1
answer81
viewsA: script import in wrong order, Function not defined
I ended up making: Map.: <script> import init_map from '../../assets/js/map.js'; ... </script> map js. const key = ******; export default function init_map(some_args) { ... }…
-
2
votes1
answer81
viewsQ: script import in wrong order, Function not defined
I have a Vue Component (Map.vue): <template> ... </template> <script> import '../../assets/js/map.js' export default { name: 'home', data () { return { init_data: {}, } }, created:…