src/Models/Repository/CategoryRepository.php
public function create($data)
    {
        if (Session::has('multi_language_enabled')) {
            $languageId = $data['language_id'];
            $languaModel = Language::find($languageId);

            if ($languaModel->is_default) {
                return Category::create($data);
            } else {
                return CategoryTranslation::create($data);
            }
        } else {
            return Category::create($data);
        }
    }
public function create($data)
    {
        if (Session::has('multi_language_enabled')) {
            $languageId = $data['language_id'];
            $languaModel = Language::find($languageId);

            if ($languaModel->is_default) {
                return Category::create($data);
            } else {
                return CategoryTranslation::create($data);
            }
        } else {
            return Category::create($data);
        }
    }
public function create ( $ data ) { if ( Session :: has ( 'multi_language_enabled' ) ) { $ languageId = $ data [ 'language_id' ] ; $ languaModel = Language :: find ( $ languageId ) ; if ( $ languaModel -> is_default ) { return Category :: create ( $ data ) ; } else { return CategoryTranslation :: create ( $ data ) ; } } else { return Category :: create ( $ data ) ; } }
Create a Category

@return \AvoRed\Framework\Models\Database\Categoy
Create a Category