Skip to content
Advertisement

Tag: yii2

How to Manage Assets in yii2 using twig in child template?

I want to extend my base twig template with some asset bundles and add new assets in child template. So I got error “A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag?” So need I to set each asset to blocks? That is uncomfortable

Api of Multiple file upload in yii2

Hey there I am beginner in yii2 and learning to create a api in yii2 as I stuck when my request has given me only 1 array of file instead of multiple Below is my model file And This below code is of action in which I am uploading a multiple images And this is what i got response for

Why the session destroyed every page load in mobile browsers?

My problem is that I have a website and when I refresh the a page, the session get destroyed. This means I lost my cart, my wishlist, etc… It happens in Safari and Firefox too, but on my PC the session stays there. This is not an incognito tab/window, I not deleting my cookies and/or session data between refreshes and

How do I add a filter on yii2 models

I have a query used to read data from a view. I am then applying a non related sql filter to this, to take out the models I don’t need and then returning an arrayDataProvider instance. The filter I am applying is the promotion period. However, when I pass query params to this search model, it doesn’t work. How do

Yii2, get an average value from timestamps

I have a basic table with orders, which have a field thats called created_at which is in timestamp format and I want to get the avarage on how many orders have been created per day. Found a other similar qestion about something like mine question whichI have posted below in the hope that everybody understand what im trying to do.

Advertisement