Wiki

Sorted by viewsX
Displaying 411-420 of 786 result(s).

Upload files in Yii2 with MongoDb and GridFs

Created 4 years ago by edoardo849How-tos3 comments – viewed 20,085 times – ( +8 / -1 ) – version 2.0
Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).

ACL and RBAC

Created 5 years ago by zeroByteHow-tos0 comments – viewed 20,078 times – ( -1 ) – version 1.1
This HowTo assumes that you have a smattering of ACL in general and of how the acl-extension works basically. It will introduce you into the abstract and give you a hint on how to use Business-Rules. If you have in-depth questions, please refer to the extension documentation. Using ACL in an RBAC-manner cannot and should never obscure the fact that the underlying system is still ACL-based. In fact, the Business-Rules are just another layer in the permission-check plan.

Yii2 default values for Index data Provider

Created 3 years ago by CTalaTips3 comments – viewed 20,022 times – ( +4 / -1 ) – version 2.0
Guys,

A simple class to use a different db for a module

Created 6 years ago by tydeas_drTips3 comments – viewed 19,969 times – ( +10 / -1 ) – version 1.1
What would you do if you want/need to have a different than the main database connection in an module's models?

Install specific Yii2 vendor extension & dependency without updating other packages.

Created 3 years ago by Kartik VTips0 comments – viewed 19,900 times – ( +40 / -7 ) – version 2.0
The tips here are for advanced usages of composer and its assumed you have read about using composer and have a knowledge of your vendor packages to be updated. Let's consider, you want to update only one specific yii2 vendor library, without updating all the other extension packages?

Force a User to Change Their Password (ChangePasswordFilter)

Created 6 years ago by waterloomattTutorials2 comments – viewed 19,861 times – ( +16 / -3 ) – version 1.1
Sometimes you need to force a user to change their password after x number of days. This article describes how to implement this using a filter, ChangePasswordFilter.

Logout CSRF Protection

Created 6 years ago by Rodrigo CoelhoTutorials1 comment – viewed 19,858 times – ( +10 / -1 ) – version 1.1
CSRF is the acronymn for Cross-site request forgery. It is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated.

[Updated] How to create & call custom global function in whole application?

Created 3 years ago by Rohit SutharTutorials8 comments – viewed 19,852 times – ( +5 / -3 ) – version 1.1
In this wiki I will show how to create own custom global function. It may be save the space and reduce the time.

Remove Byte Order Mark (BOM) from files recursively

Created 4 years ago by Kostas Apazidis (KonApaz)How-tos3 comments – viewed 19,809 times – ( +6 / -2 ) – version all
Ok, this wiki is not only for yii projects.