Here's a possible implementation for MongoDb of the RBAC standard. Create a class "MongoDbManager" in `common\components
and modify your
params.php
` file like this:
Here's a possible implementation for MongoDb of the RBAC standard. Create a class "MongoDbManager" in `common\components
and modify your
params.php
` file like this:
I leverage Kartik's notification widgets.
Ok, you have installed a Yii 2 basic or advanced app for the first time and completed the post install steps. You have picked up a few extensions to install for the first time as well. You would already see a composer.lock
file in your application root folder.
You have different collections in MongoDb with de-normalized attributes. As you may know, due to its not-join nature, MongoDb tends to encourage repetition of the same value in different collections (de-normalization). In this MongoDb is opposed to a more SQL-like approach where you usually reference only the ID of the value with a foreign key.
A Yii Framework 2 component for using assets in different environments (Local/CDNs)
Yii2 introduces the BootstrapInterface to ease our application initialization tasks, whether they are composer
based or Application bootstrap (do not mistaken with Bootstrap CSS Framework) based tasks. On this article, I am going to explain how to use it on y...
In Yii1 I used to have my own components under the components folder of the structure, now with namespacing this is a little bit different.
The yii2-datecontrol extension allows you to control separate date formats for display and saving for form inputs.
I just chased my tail around for a bit today. I got lost with setting the status of all inputs, and banging my head on why the "validate" function just wasn't working.
So you want to use a fork of any existing vendor extension with your Yii 2 install and use the fork, instead of original source. This does not need you to push any update or register your package on packagist.org. You are recommended to follow the approach below:
Note the tag {{homeUrl}}
will be dynamically replaced at runtime.
In Yii 1.x, there was a built in widget CStarRating
based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.
Implementing a role based access control is a very easy process and you can even load your roles from the database if you want.
It is quite simple, but I am sure this small tutorial will help more than one of you out there :)
I wrote about this on my blog, but wanted to post it here too.
The yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.
Personalmente trovo che la versione "portable" sia molto più semplice da aggiornare, ed io tengo sempre costantemente aggiornato TUTTO il parco software relativo al mio webserver.
suppose to have in Mongo a collection "user" like:
So, you have installed a brand new Yii 2 app (basic) or (advanced). Here are a few tips for Apache web server users to get things running more secure and better with your yii2 app.