Method common to dashboard and frontend controller

Permalink
Hi,

Is there a recommended way to create objects / methods to be used both on frontend and backend?

 
WillemAnchor replied on at Permalink Best Answer Reply
WillemAnchor
What I do is create a class in
/MyPackage/src/Myclass.php
<?php
namespace Concrete\Package\MyPackage\Src;
// use ...
class Myclass;
//..
}


To use it just include it in your controller:
use Concrete\Package\MyPackage\Src\MyClass as MyClass;
alinpop replied on at Permalink Reply
Hi,

Thanks for the suggestion.