diff --git a/src/Elements/A.php b/src/Elements/A.php index 2e3d3d1..dd1ba76 100644 --- a/src/Elements/A.php +++ b/src/Elements/A.php @@ -20,4 +20,15 @@ public function href($href) { return $this->attribute('href', $href); } + + /** + * @param string|null $route + * @param mixed $params + * + * @return static + */ + public function route($route, ...$params) + { + return $this->href(route($route, ...$params)); + } } diff --git a/src/Elements/Img.php b/src/Elements/Img.php index 70afd27..c06ce07 100644 --- a/src/Elements/Img.php +++ b/src/Elements/Img.php @@ -27,4 +27,34 @@ public function src($src) { return $this->attribute('src', $src); } + + /** + * @param string|null $srcset + * + * @return static + */ + public function srcset($srcset) + { + return $this->attribute('srcset', $srcset); + } + + /** + * @param string|null $loading + * + * @return static + */ + public function loading($loading) + { + return $this->attribute('loading', $loading); + } + + /** + * @param string|null $crossorigin + * + * @return static + */ + public function crossorigin($crossorigin) + { + return $this->attribute('crossorigin', $crossorigin); + } }