Skip to content

Tag: laravel

Add class only on first carousel-cell (flickity)

i would have the class “opacity” inserted only at the first “carousel-cell”. For the rest in the loop, they should not be there. Answer You could use the $loop->first variable to add a class only on the first iteration of the loop. Like this: <div class=”carousel-cell {{ $l…

query laravel not working if pass variable in Where NOT IN

I’m trying to filter items from a database table what I do is get the ids that I want to exclude and then through -> whereNotIn in laravel, I pass the ids up to this point I have no problem. the result of “implode” gives me the ids I want to remove this is the result of $idbike and $notid…

Retrieve data from the name of a directory in my database

I use php and laravel. I have a column named MsgBody. In this column, there is an array as follows. I want to get the value of “conversationDesc” from this array. What should I do in the Controller and blade part for this? Answer It seems that your data are JSON. You can decode this using json_dec…

Larave Cache Facade – set vs put

I use Cache::set(…) facade-method for a simple key/value store. But all posts I visit seem to talk about Cache::put(…) method. What is the difference or advantage of one vs the other? Answer set method is same as put As you can see from https://github.com/illuminate/cache/blob/master/Repository.ph…

Image Preview from DB

I’m Trying to Preview images from database as im saving album in table albums and album images in table images and connecting with relation but i can’t preview the images from table image so i’m adding relations between the 2 tables and trying to preview the images but its not working with m…