PHP Classes

File: src/Helpers/Agent.php

Recommend this page to a friend!
  Classes of Moamen Eltouny   Laravel Agents Detector   src/Helpers/Agent.php   Download  
File: src/Helpers/Agent.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Laravel Agents Detector
Detect the browser type and store it model objects
Author: By
Last change:
Date: 3 years ago
Size: 226 bytes
 

Contents

Class file image Download
<?php

use Pharaonic\Laravel\Agents\Classes\AgentDetector;

/**
 * Getting Agent Object
 *
 * @return Agent
 */
function agent()
{
    return
app()->has('Agent') ? app('Agent') : app()->instance('Agent', new AgentDetector);
}