weboAp/Visitor

Non-static method

kris-terziev opened this issue · 3 comments

Hello,

The package looks great but i get this error:

Non-static method should not be called statically.

can you post more info about the error so i can troubleshoot it? thanks

Same problem here. Here is a simple code so you can know the issue

<?php
use Weboap\Visitor\Visitor;

class Log
{   
    public function test(){
        Visitor::log();
    }

}

replace the statement

use Weboap\Visitor\Visitor; 

with

use Visitor; // the package Facade.

you can use also

<?php
use Weboap\Visitor\Visitor;

class Log
{   
protected $visitor;

public function test(Visitor $visitor){
        $visitor->log();
    }

}