Accessing Laravel 4 composer package resources

I just added a Twitter downloader via composer in Laravel 4, but I'm not sure how to actually reference files like bootstrap-tooltip.js

, bootstrap-transition.js

etc. in my click template.

This is not a class question {{HTML::}}

, I know it was removed in version 4. I just want to know how to access media that is not stored in the directory /public/

.

I guess if I did it manually I would have js in the directory /public/js/

but when installing the package via composer the files are stored in/vendor/twitter/bootstrap/js/

It was a long shot and even felt wrong, but I tried:

<script src="{{ path('vendor/twitter/bootstrap/js/bootstrap-transition.js') }}"></script>

      

Hope this makes sense and someone can advise (I also hope that I wouldn't be stupid and miss something really obvious).

+3


source to share


1 answer


This can help...

This will require some kind of post script composer similar to the one using Symfony Bootstrap

https://github.com/phiamo/MopaBootstrapBundle/blob/master/Composer/ScriptHandler.php

      



There is an Artisan command to move resources for packages, but I'm not sure if it works with generic providers

php artisan asset:publish vendor/package

      

+1


source







All Articles