{"repo":"BenSampo/laravel-embed","free":true,"listed":false,"github":"https://github.com/BenSampo/laravel-embed","clone":"git clone https://github.com/BenSampo/laravel-embed.git","description":"Effortless responsive embeds for videos, slideshows and more.","language":"PHP","stars":144,"topics":["laravel","laravel-package","embed","youtube","vimeo"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Laravel Embed Effortless responsive embeds for videos, slideshows and more. Created by Ben Sampson Requirements - Laravel 8 or newer - PHP 7.4.0 or newer Installation 1. Composer 2. Include styles Somewhere inside the element of the document, include: If you'd prefer to include the styles in your own CSS file, you may copy the contents of styles.blade.php . 3. Publish views (optional) If you'd like to edit any of the views you may publish them: Once published they can be found in /resources/views/vendor/embed/ . Usage Simply include the following blade component in your view making sure to pass the url attribute. The url should be the public URL for the page you're trying to embed. Setting the aspect ratio By default most embedded services are shown at a ratio of 16:9 . Some services may override this if they have a more appropriate default. However, you can always change this by passing in a ratio to the aspect-ratio attribute. The aspect ratio is maintained at different viewport sizes. Fallback If no service exists to handle the URL a fallback view is rendered. You can customize this by publishing the views and editing /resources/views/vendor/embed/services/fallback.blade.php . Validation A validation rule can be used to check for a supported service in a given URL. You may specify a list of allowed services using the allowedServices method. Embed Services Laravel embed supports multiple popular embed services such as YouTube, Vimeo and Slideshare. See the full list &rarr; ","default_branch":null,"files":null,"tree":[],"storefront":"/r/BenSampo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/BenSampo/laravel-embed/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}