All Projects β†’ riverskies β†’ Laravel Mobile Detect

riverskies / Laravel Mobile Detect

Licence: mit
Mobile detection within Blade templates

Projects that are alternatives of or similar to Laravel Mobile Detect

Vuejs2 Laravel53 Starter
A starter template for VueJs 2.0 with Laravel 5.4
Stars: ✭ 112 (-27.27%)
Mutual labels:  laravel, laravel-5-package
Facebook
πŸ“¨ Facebook Notifications Channel for Laravel
Stars: ✭ 120 (-22.08%)
Mutual labels:  laravel, laravel-5-package
Eye
Eyewitness.io package for Laravel 5 applications
Stars: ✭ 114 (-25.97%)
Mutual labels:  laravel, laravel-5-package
Laravel Single Session
This package prevents a User from being logged in more than once. It destroys the previous session when a User logs in and thereby allowing only one session per user.
Stars: ✭ 95 (-38.31%)
Mutual labels:  laravel, laravel-5-package
Laravel Model Caching
Eloquent model-caching made easy.
Stars: ✭ 1,829 (+1087.66%)
Mutual labels:  laravel, laravel-5-package
Llum
Llum (light in catalan language) illuminates your Laravel projects speeding up your Github/Laravel development workflow
Stars: ✭ 107 (-30.52%)
Mutual labels:  laravel, laravel-5-package
L5 Swagger
OpenApi or Swagger integration to Laravel
Stars: ✭ 1,781 (+1056.49%)
Mutual labels:  laravel, laravel-5-package
Brandenburg
Laravel Authentication Package
Stars: ✭ 79 (-48.7%)
Mutual labels:  laravel, laravel-5-package
Laravel Swagger
Auto generates the swagger documentation of a laravel project based on best practices and simple assumptions
Stars: ✭ 129 (-16.23%)
Mutual labels:  laravel, laravel-5-package
L5 Very Basic Auth
Stateless HTTP basic auth for Laravel without the need for a database.
Stars: ✭ 127 (-17.53%)
Mutual labels:  laravel, laravel-5-package
Flysystem Upyun
Laravel εˆζ‹δΊ‘ζ–‡δ»Άε­˜ε‚¨οΌŒδΈŠδΌ οΌŒεˆ ι™€γ€‚
Stars: ✭ 92 (-40.26%)
Mutual labels:  laravel, laravel-5-package
Adminlte Laravel
A Laravel 5 package that switchs default Laravel scaffolding/boilerplate to AdminLTE template and Pratt Landing Page with Bootstrap 3.0
Stars: ✭ 1,814 (+1077.92%)
Mutual labels:  laravel, laravel-5-package
Artify
The Missing Laravel Commands
Stars: ✭ 89 (-42.21%)
Mutual labels:  laravel, laravel-5-package
Laravel Excel
πŸš€ Supercharged Excel exports and imports in Laravel
Stars: ✭ 10,417 (+6664.29%)
Mutual labels:  laravel, laravel-5-package
Laravel Enum
Simple, extensible and powerful enumeration implementation for Laravel.
Stars: ✭ 1,278 (+729.87%)
Mutual labels:  laravel, laravel-5-package
Pagination
🎁 Laravel 5 Custom Pagination Presenter
Stars: ✭ 119 (-22.73%)
Mutual labels:  laravel, laravel-5-package
Laravel 5 Messenger
A Simple Laravel 5, 6, 7 & 8 Messenger with Pusher Capabilities
Stars: ✭ 75 (-51.3%)
Mutual labels:  laravel, laravel-5-package
Laravel Pdf
A Simple package for easily generating PDF documents from HTML. This package is specially for laravel but you can use this without laravel.
Stars: ✭ 79 (-48.7%)
Mutual labels:  laravel, laravel-5-package
Laravel Form Builder
Laravel Form builder for version 5+!
Stars: ✭ 1,601 (+939.61%)
Mutual labels:  laravel, laravel-5-package
Credit Card
Credit Card Validation
Stars: ✭ 150 (-2.6%)
Mutual labels:  laravel, laravel-5-package

Laravel Mobile Detect

A package that enables you to use device detection right in your Blade templates. (Utilises the well-known, constantly updated PHP mobile detection library.)

When would you use this package?

Responsive CSS may help to make content in the browser look nice on different devices but it won't help you serve responsive content from your backend (at least not the easy way). This can have a really bad knock-on effect on the user experience (have you ever waited for a large image to load while having a bad connection on your mobile?). This package will make it a breeze to serve device-specific content right from your back-end.

How does this package work?

The package implements various Blade directives that you can use to serve different content from your Blade template for different device types.

Installation

Install the package through composer:

$ composer require riverskies/laravel-mobile-detect

Laravel 5.4 or earlier

Add the service provider to your config/app.php file:

Riverskies\Laravel\MobileDetect\MobileDetectServiceProvider::class

Optionally, you can add an alias as well if you'd like to use the underlying instance anywhere else (or have access to all the functions):

'MobileDetect' => Riverskies\Laravel\MobileDetect\Facades\MobileDetect::class

Usage

Use the new Blade directives in your template files:

@desktop
    <img src="/path/to/high-definition/image"/>
@elsedesktop
    <img src="/path/to/handheld-optimised/image"/>
@enddesktop

NOTE You might have to run php artisan view:clear to have the new Blade directives take effect!

Available directives

@desktop, @elsedesktop, @enddesktop - for destkop devices

@handheld, @elsehandheld, @endhandheld - for non-desktop (mobile and tablet) devices

@tablet, @elsetablet, @endtablet - for tablet devices

@nottablet, @elsenottablet, @endnottablet - for non-tablet (desktop or mobile) devices

@mobile, @elsemobile, @endmobile - for mobile devices

@notmobile, @elsenotmobile, @endnotmobile - for non-mobile (desktop or tablet) devices

@ios, @elseios, @endios - for iOS platforms

@android, @elseandroid, @endandroid - for Android platforms

The usage of @else... directives are optional.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].