Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected function saveToFile($data, $file)
- {
- **file_put_contents($file, "<?phpnreturn " . VarDumper::export($data) . ";n", LOCK_EX);
- $this->invalidateScriptCache($file);**
- }
- public function actionRole()
- {
- $admin = Yii::$app->authManager->createRole('admin');
- $admin->description = 'Admin Utama';
- Yii::$app->authManager->add($admin);
- $user = Yii::$app->authManager->createRole('author');
- $user->description = 'Admin ke 2';
- Yii::$app->authManager->add($user);
- return 12345;
- }
Add Comment
Please, Sign In to add comment