Download the PHP package elvendor/imgjss without Composer
On this page you can find all versions of the php package elvendor/imgjss. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package imgjss
imgjss Laravel Package
Imgjss is a simple Laravel 4 package that provides handy way of including assets into your .blade.php
files.
Now you can use HTML::style()
, HTML::script()
and HTML::image()
via short Blade syntax.
Join our Russian Laravel Community webchat on Gitter!
Features
Avoid putting extensions of js & css files, package adds it automatically:
same as:
But as for images, you should use file extensions:
Pass attributes array as second parameter:
By default package automatically appends last modified timestamp of the file as query string. You can change/disable this behavior in config file or simply pass true/false as third parameter:
When using Laravel's HTML::image()
you pass alt
attribute as second param, and other attributes as third.
I think that is not good idea. Using @img
syntax this package provides you can pass all in one array:
Fourth parameter is for including asset from secure location of your website, e.g. https://...
. Its false
by default.
And lastly, please notice that package doesn't throw NotFoundException when asset wasn't exist.
Requirements
- PHP >= 5.4
- Laravel >= 4.0
Installation
-
The Imgjss package can be installed via Composer by requiring the
elvendor/imgjss
in yourcomposer.json
file: -
Add Service Provider to providers list:
- If you plan to change package defaults, you can also publish config file:
Roadmap
- [ ] Avoid images extensions by looking for a file on given path (probably not a good idea)
- [ ] Setting default js, css, img paths
- [x] Ability to use external assets as well
- [ ] Cover with tests
Licence
Imgjss is open-sourced software licensed under the MIT license.