jenssegers / agent

👮 A PHP desktop/mobile user agent parser with support for Laravel, based on Mobiledetect
https://jenssegers.com
MIT License
4.53k stars 473 forks source link

Use Agent trait in Controller and i get error #127

Closed pishguy closed 6 years ago

pishguy commented 6 years ago

when i try to define Agent in Controller like with:

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests, SEOToolsTrait, Jenssegers\Agent\Agent;

    public $agent;

    public function __construct()
    {
        $this->agent = new Agent();
    }
}

i get this error:

Trait 'App\Http\Controllers\Jenssegers\Agent\Agent' not found