Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 14:31
    rob006 commented #19700
  • Dec 04 23:17
    what-the-diff[bot] commented #19703
  • Dec 04 23:17
    Arhell labeled #19703
  • Dec 04 23:17
    Arhell opened #19703
  • Dec 04 16:55
    samdark closed #19693
  • Dec 04 16:55
    samdark closed #19694
  • Dec 04 16:55
    samdark synchronize #19694
  • Dec 04 14:35
    yii-bot closed #19629
  • Dec 04 14:35
    yii-bot commented #19629
  • Dec 04 14:35
    bizley labeled #19629
  • Dec 04 09:41
    bizley closed #19702
  • Dec 04 09:08
    Arhell review_requested #19702
  • Dec 04 09:08
    Arhell review_request_removed #19702
  • Dec 04 02:12
    Arhell synchronize #19702
  • Dec 04 02:12
    Arhell review_requested #19702
  • Dec 04 02:11
    Arhell ready_for_review #19702
  • Dec 03 15:33
    kamarton commented #19699
  • Dec 03 01:09
    what-the-diff[bot] commented #19702
  • Dec 03 01:09
    Arhell labeled #19702
  • Dec 03 01:09
    Arhell opened #19702
Alexander Makarov
🔥🎁 #Yii news 2021 issue 3 is here: https://opencollective.com/yiisoft/updates/yii-news-2021-issue-3
i have 3 dropdowns.....exists anything in kartik that when i select one dropdown the other twos are bloqued?
1 reply
I think you should address your question directly to https://github.com/kartik-v since this channel here is about the framework and not about 3rd-party extensions or plugins.

Hello guys!
I have a task for writing history of changes in my little project, i had CRUD conception in my project and 2 controllers for him.
Somebody can help me with logic for this task?

i started from afterAction hook, but i dont know how to send my params in this hook

@xDaemonic A code example would be helpful.
I have a question if I have a view and right now it send to one action controller, How would i send a ajax call on that same page to use a different action should I make a route for that action its supposed to just update a table no redirecting

good day, i setup DBSession:

    'session' => [
        'class' => 'yii\web\DbSession',
        'timeout' => 3600 * 4,
        'writeCallback' => function($session)
            return [
                'user_id' => Yii::$app->user->isGuest ? null : Yii::$app->user->id,
                'agent' => Yii::$app->request->userAgent,
                'ip' => ip2long(Yii::$app->request->userIP),

create mysql table:

CREATE TABLE tbl_session (
id char(64) NOT NULL,
expire int(11) DEFAULT NULL,
data blob,
user_id char(36) DEFAULT NULL,
agent char(255) DEFAULT NULL,

and when user is login user_id is ignored to insert to db, in debug i have request:
NSERT INTO tbl_session (user_id, agent, ip, data, id, expire) VALUES ('ab44c918-81f3-46fc-9720-a168ce652729', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36', 168433921, 'flash|a:0:{}returnUrl|s:26:\"\";id|s:36:\"ab44c918-81f3-46fc-9720-a168ce652729\";authKey|s:12:\"a168ce652729\";', 'ha5gmmtpatjou0', 1638538767) ON DUPLICATE KEY UPDATE agent=VALUES(agent), ip=VALUES(ip), data=VALUES(data)

why user_id is ignored on "ON DUPLICATE KEY UPDATE"?
I think this has to do with a missing PRIMARY or UNIQUE KEY in your database table schema:

I think this has to do with a missing PRIMARY or UNIQUE KEY in your database table schema:

thanks for your message, problem is solved. user_id was foreign key.

Taha Fathallah
how to use UNSIGNED in Yii 2 , i try this Schema::Type_INTEGER.’ UNSINGED ‘ but its not working ?
You are talking 'bout migrations? Maybe something like this:
$this->createTable('tableName', [
    'id' => $this->integer()->unsigned()->notNull(),
    // ...
2 replies
Alexander Makarov
🎄#yii news, issue 4: https://opencollective.com/yiisoft/updates/yii-news-2021-issue-4 🎄Merry Christmas and happy New Year! 🎄
It is possible to post your packages directly in the project. For downloading and installation, a special php file is used called Manage.php
Alberto Passalacqua
thank you @samdark :-)
Здравствуйте! При создании поста создать нового пользователя (сложную модель) в модальном окне и вернутся и соответственно выбрать
Negruzzi Cristian
is there a tutorial how to work with AuthClient for registration with social networks?

Hi everyone
I think that one of the reasons for the lack of development of Yii framework community compared to the Laravel framework is that Yii framework is insular in the local languages of each country.
Now with the review I did:

Russian telegram group: about 2000 members
Indonesian telegram group: about 1500 members
Uzbekistan telegram group: about 500 members

But there is no any English telegram group for powerful Yii2 framework. Why? 😳😐🤔

in this reason, I created a telegram group for Yii2 in English, please join it:


Boris Osciel Castillo Pizarro

$time = new DateTimeImmutable('now', new DateTimeZone('America/Santiago'));
$date = new DateTimeImmutable('now', new DateTimeZone('America/Santiago'));

echo "event: time\n",'data: {"time":"' . $time->format('H:i:s') .'", "date":"'. $time->format('l j F Y'). '"}', "\n\n";

event: time
data: {"time":"17:34:55", "date":"Friday 30 September 2022"}

Format in spanish

Alexander Makarov