digitlab / adaptive-view
Adaptive views for Laravel.
v1.1.0
2016-03-04 14:44 UTC
Requires
- php: >=5.6
- illuminate/support: ^5.0
- illuminate/view: ^5.0
- jenssegers/agent: ^2.0
Requires (Dev)
- mockery/mockery: ~0.9.2
- phpunit/phpunit: ^5.0
- satooshi/php-coveralls: ^0.6
This package is not auto-updated.
Last update: 2024-11-09 19:45:42 UTC
README
An adaptive view extension for Laravel.
Installation
Install using composer:
composer require digitlab/adaptive-view
Follow the instructions in setting up Agent.
Add the service provider in app/config/app.php:
DigitLab\AdaptiveView\AdaptiveViewServiceProvider::class,
Usage
You can create a mobile view with the .mobile.blade.php
extension. Similarly you can create tablet views with
the .tablet.blade.php
extension. Mobile and tablet views will fallback to normal views if they do not exist.
Troubleshooting
- Check that AdaptiveViewServiceProvider is registered as soon after the ViewServiceProvider as possible. Invoking the view factory before registering AdaptiveViewServiceProvider will cause it not to work.
License
Adaptive View is licensed under The MIT License (MIT).