Difference between #142 and #143 of
Yii v2 snippet guide

Revision #143 has been created by rackycz on Oct 6, 2019, 8:04:56 PM with the memo:

scenario
« previous (#142) next (#144) »

Changes

Title unchanged

Yii v2 snippet guide

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
],
],
],
```

You can customize the calendar in many ways. For example different event-color is shown [here](https://fullcalendar.io/docs/event-colors-demo). Check the source code.

 
 
**Scenarios - UNKNOWN SCENARIO EXCEPTION**
 
---
 
I have been using scenarios a lot but today I spent 1 hour on a problem - I had 2 scenarios and one of them was just assigned to the model ...
 
```php
 
$model->scenario = "abc";
 
```
 
... but had no **rule** defined yet. I wanted to implement the rule later, but I didnt know that when you set a scenario to your model it **must** be used in method rules() or defined in method scenarios(). So take this into consideration. I expected that when the scenario has no rules it will just be skipped or deleted. 
7 0
4 followers
Viewed: 274 857 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: a year ago
Update Article

Revisions

View all history