Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace app\models;
- use yii\db\ActiveRecord;
- use yii;
- class Blog extends ActiveRecord{
- public static function tableName(){
- return 'blog';
- }
- public function getCategory(){
- return $this->hasOne(Blog::className(), ['id' => 'id']);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement