I want to get the both name in english and arabic in blade
Enadabuzaid opened this issue · comments
public function index() { $categories = Category::withTranslation()->paginate(15); return view('dashboards.admin.categories.index' , compact('categories')); }
Hello! You can use translate
method to translate your model to specific language.
$bookEnglish = $book->translate('en')
$bookArabic = $book->translate('ar')