src/BoomCMS/Http/Controllers/Asset/AssetController.php
public function embed(Request $request, Asset $asset): View
    {
        $viewPrefix = 'boomcms::assets.embed.';
        $assetType = strtolower(class_basename($asset->getType()));
        $viewName = $viewPrefix.$assetType;

        if (!view()->exists($viewName)) {
            $viewName = $viewPrefix.'default';
        }

        return view()->make($viewName, [
            'asset'  => $asset,
            'height' => $request->input('height'),
            'width'  => $request->input('width'),
        ]);
    }
public function embed(Request $request, Asset $asset): View
    {
        $viewPrefix = 'boomcms::assets.embed.';
        $assetType = strtolower(class_basename($asset->getType()));
        $viewName = $viewPrefix.$assetType;

        if (!view()->exists($viewName)) {
            $viewName = $viewPrefix.'default';
        }

        return view()->make($viewName, [
            'asset'  => $asset,
            'height' => $request->input('height'),
            'width'  => $request->input('width'),
        ]);
    }
public function embed ( Request $ request , Asset $ asset ) : View { $ viewPrefix = 'boomcms::assets.embed.' ; $ assetType = strtolower ( class_basename ( $ asset -> getType ( ) ) ) ; $ viewName = $ viewPrefix . $ assetType ; if ( ! view ( ) -> exists ( $ viewName ) ) { $ viewName = $ viewPrefix . 'default' ; } return view ( ) -> make ( $ viewName , [ 'asset' => $ asset , 'height' => $ request -> input ( 'height' ) , 'width' => $ request -> input ( 'width' ) , ] ) ; }
Returns the HTML to embed the given asset.

@param Request $request
@param Asset   $asset

@return View
Returns the HTML to embed the given asset .