Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

raviawasti's avatar

Add jenssegers/agent or riverskies/laravel-mobile-detect package manually in laravel

I want to detect mobile/tablet scree size and load that individual views for specific screen size.. I am in production mode and i want one of the package to install in my project manually without composer require or install , Please help me in step by step..You help will be appreciated..thanks in advance

These are the package in want to install:- https://github.com/riverskies/laravel-mobile-detect

(or)

https://github.com/riverskies/laravel-mobile-detect

0 likes
4 replies
Snapey's avatar

A better strategy is to adapt your layout with CSS and media queries rather than serving different views?

raviawasti's avatar

@Snapey Thanks for your reply

Our mage sizes are very large and high quality .

But when we use css with media queries for mobile and laoptop

I agree with you but It won't be shown in that particular screen size but it will be loaded in back-end ..which will increase my website laod time .. that is the reason I want to load specific view for specific screen size..any conclusion..help @snapey sir

raviawasti's avatar

I have found the answer..Now i can show two different image on two different screen size..without loading on backend..

MDN
1 like

Please or to participate in this conversation.