$smarty->assign('name', 'John Doe'); $smarty->assign('age', 30);
$twig->addGlobal('company', 'Acme Inc.'); $twig->addGlobal('year', 2021);
$view->with('title', 'My Blog'); $view->with('posts', $posts);In this example, we are passing two variables (`title` and `posts`) to a Blade view for rendering. These examples are part of larger packages/libraries that provide full-featured templating engines. In each case, the examples are from the respective package/library (Smarty, Twig, and Blade) that include the `Template assign` method.