PHP code example of backend2-plus / is-mobile-bundle

1. Go to this page and download the library: Download backend2-plus/is-mobile-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

backend2-plus / is-mobile-bundle example snippets


use IsMobile\IsMobileBundle\IsMobile;

#[Route('/', name: 'app_home')]
public function index(IsMobile $isMobile): JsonResponse
{

    return $this->json([
        'isMobile' => $isMobile->isMobile()
    ]);
}