Skip to content

Commit

Permalink
Update Helper.php
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Nov 14, 2023
1 parent 568017a commit cecce44
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

namespace App\Helpers;

use DeviceDetector\DeviceDetector;
use Illuminate\Support\Str;
use Illuminate\Support\Stringable;
use Spatie\Url\Url as SpatieUrl;

class Helper
{
public static function deviceDetector(): DeviceDetector
/**
* Parse any User Agent
*
* @return \DeviceDetector\DeviceDetector
*/
public static function deviceDetector()
{
$dd = new DeviceDetector(request()->userAgent());
$dd->setCache(
new \DeviceDetector\Cache\LaravelCache
);

$dd = new \DeviceDetector\DeviceDetector(request()->userAgent());
$dd->setCache(new \DeviceDetector\Cache\LaravelCache);
$dd->parse();

return $dd;
Expand Down

0 comments on commit cecce44

Please sign in to comment.