php - fuelphp - how can I add a custom path to the asset class? -


ok,

so quick question driving me crazy fuelphp

for css, js, , img assets can in view

<?php echo asset::css('main.css'); ?> 

but if try add folder - example - "media" public/assets directory can not this:

<?php echo asset::media('myvideo.mp4'); ?> 

does know if there way configure kind of functionality? has been able modify asset class that?

thank time , help!

i don't know if there such fashion create own static method name (the 1 media haven't tried yet). declare path instead. consider example:

(file in public/assets/media/file.mp4)

controller

asset::add_path('assets/media/', 'media'); 

view

<a href="<?php echo asset::get_file('file.mp4', 'media'); ?>">video 1</a> 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -