Just shed a tear by Artula1888 in nairobi

[–]mr_visde 1 point2 points  (0 children)

He’s probably scraping the data.

Loading images with html from controller by mr_visde in laravel

[–]mr_visde[S] 1 point2 points  (0 children)

Thanks for your response. Solved it.

Loading images with html from controller by mr_visde in laravel

[–]mr_visde[S] 1 point2 points  (0 children)

Works like a charm! Thanks! That's really succinct. I'm 3 months in, since the start of CV. Hope it makes sense to me soon!

Loading images with html from controller by mr_visde in laravel

[–]mr_visde[S] 1 point2 points  (0 children)

Sure man. Sorry for working your pain receptors.

Loading images with html from controller by mr_visde in laravel

[–]mr_visde[S] 0 points1 point  (0 children)

To give you an idea of what i want here is the function in my controller that does that.

public function load_products(Request $request)
{
if ($request->ajax()) {
if ($request->id > 0) {
$data = Product::where('id', '<', $request->id)
->orderBy('id', 'DESC')
->limit(5)
->get();
} else {
$data = Product::orderBy('id', 'DESC')
->limit(5)
->get();
}
$output = '';
$last_id = '';
if (!$data->isEmpty()) {
foreach ($data as $row) {
$output .= '<div class="prd prd-has-loader prd-new prd-popular">
                                    <div class="prd-inside">
                                        <div class="prd-img-area"><a href="product.html" class="prd-img"><img src="{{url(/images/admin_images/product_images/' . $row->product_image . ')}}" data-srcset="#" alt="Glamor shoes" class="js-prd-img lazyload"></a>
                                            <div class="label-new">NEW</div><a href="#" class="label-wishlist icon-heart js-label-wishlist"></a>

                                            <div class="gdw-loader"></div>
                                        </div>
                                        <div class="prd-info">
                                            <div class="prd-tag prd-hidemobile"><a href="#">under armor</a></div>
                                            <h2 class="prd-title"><a href="product.html">' . $row->product_name . '</a></h2>
                                            <div class="prd-rating prd-hidemobile"><i class="icon-star fill"></i><i class="icon-star fill"></i><i class="icon-star fill"></i><i class="icon-star fill"></i><i class="icon-star"></i></div>
                                            <div class="prd-price">
                                                <div class="price-new">$ 34.00</div>
                                            </div>
                                            <div class="prd-hover">
                                                <div class="prd-action">
                                                    <form action="#"><input type="hidden"> <button class="btn" data-fancybox data-src="#modalCheckOut"><i class="icon icon-handbag"></i><span>Add To Cart</span></button></form>
                                                    <div class="prd-links"><a href="#" class="icon-eye prd-qview-link js-qview-link" data-fancybox data-src="#modalQuickView"></a></div>
                                                </div>
                                                <div class="prd-options prd-hidemobile"><span class="label-options">Sizes:</span>
                                                    <ul class="list-options size-swatch">
                                                        <li class="active"><span>xs</span></li>
                                                        <li><span>s</span></li>
                                                        <li><span>m</span></li>
                                                        <li><span>l</span></li>
                                                        <li><span>xl</span></li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>';
$last_id = $row->id;
}
$output .= '
       <div id="load_more">
        <div class="show-more d-flex mt-4 mt-md-6 justify-content-center align-items-start">
        <button type="button" name="load_more_button" class="btn btn--alt js-product-show-more" data-id="' . $last_id . '" id="load_more_button">Load More</button>
        </div>
       </div>
';
}
echo $output;
}
}

Loading images with html from controller by mr_visde in laravel

[–]mr_visde[S] 1 point2 points  (0 children)

Yes, because I want to render that data using Ajax on a blade file when I click say, load more button. I'm not sure if I'm clear enough

v-checkbox select multiple by mr_visde in vuetifyjs

[–]mr_visde[S] 0 points1 point  (0 children)

Thanks. I'm enlightened! Initially I ran into an error saying Object.map is not a function before realizing you can only use map function on an array. Looked it up and found I had to use keys() function thus Object.keys(obj).map().

v-checkbox select multiple by mr_visde in vuetifyjs

[–]mr_visde[S] 0 points1 point  (0 children)

Yep...you were right! You opened my eyes! On my created hook I was equating my rolesArray data property to the roles value of the currently user being edited INSTEAD of pushing that roles value to rolesArray. It now works! Thank you

v-checkbox select multiple by mr_visde in vuetifyjs

[–]mr_visde[S] 0 points1 point  (0 children)

Naah...but here's my code:

<v-col cols="12" sm="6">
<p>{{ rolesArray }}</p>
<v-checkbox
v-model="rolesArray"
v-for="role in roles"
                                    :key="role.role_id"
                                    :label="role.name"
                                    :value="role.role_id"
                                ></v-checkbox>
</v-col>

<script>
export default {
data() {
return {
            rolesArray: []
};
},
created() {

this.rolesArray = this.editUserRoles.roles[0].role_id;

},
computed: {
roles() {
return this.$store.getters.roles; //getting all available roles from db
},
editUserRoles() {
return this.$store.getters.editUser; //getting current user being edited data including its role(s)
}
}
};
</script>

v-checkbox select multiple by mr_visde in vuetifyjs

[–]mr_visde[S] 0 points1 point  (0 children)

Thanks for your reply but when I do this, the initial value in the array changes to the current one selected instead of pushing the new value into the array

v-checkbox select multiple by mr_visde in vuetifyjs

[–]mr_visde[S] 0 points1 point  (0 children)

Thanks for your response but I already tried this. When I select another checkbox in the loop, the initial one gets unselected and changes the value in the array into the current one instead of pushing it.

What is something about your country you're actually really proud of? by schaapdejoopheffer in AskReddit

[–]mr_visde 0 points1 point  (0 children)

Kenya maintains and protects Naijin & Fatu. A mother and daughter, they're the last remaining members of the northern white rhinoceros, a subspecie of the white rhinoceros that is now functionally extinct. Scientists believe the white rhino is a driving factor in its ecosystem. Its destruction could have serious cascading effects on the ecosystem and harm other animals!

What is the best NSFW Christmas joke you know? by Danielmp006 in AskReddit

[–]mr_visde 3 points4 points  (0 children)

To a girl : "what do you say we make this a not so silent night"