Q:

PHP Laravel: Trait not found

I have some trouble with namespace and use. 
I get this error: "Trait 'Billing\BillingInterface' not found"
These are the files in my Laravel application:
Billing.php
namespace Billing\BillingInterface;

interface BillingInterface
{
    public function charge($data);
    public function subscribe($data);
    public function cancel($data);
    public function resume($data);
}

PaymentController.php
use Billing\BillingInterface;

class PaymentsController extends BaseController
{
    use BillingInterface;

    public function __construct(BillingPlatform $BillingProvider)
    {
        $this->BillingProvider = $BillingProvider;
    }
}

How to i use use and namespace properly? 

A:

BillingInterface is an interface not a trait.  Thus it can't find the non existent trait
Also you have an interface called BillingInterface in a namespace called Billing\BillingInterface, the fully qualified name of the interface is: \Billing\BillingInterface\BillingInterface
Perhaps you mean
use Billing\BillingInterface\BillingInterface;
// I am not sure what namespace BillingPlatform is in, 
// just assuming it's in Billing. 
use Billing\BillingPlatform;

class PaymentsController extends BaseController implements BillingInterface
{
    public function __construct(BillingPlatform $BillingProvider)
    {
        $this->BillingProvider = $BillingProvider;
    }

    // Implement BillingInterface methods
}

Or to use it as a trait. 
namespace Billing;

trait BillingTrait
{
    public function charge($data) { /* ... */ }
    public function subscribe($data) { /* ... */ }
    public function cancel($data) { /* ... */ }
    public function resume($data) { /* ... */ }
}

Again the modified PaymentsController, but with fully qualifies names. 
class PaymentsController extends BaseController
{
    // use the fully qualified name
    use \Billing\BillingTrait;

    // I am not sure what namespace BillingPlatform is in, 
    // just assuming it's in billing. 
    public function __construct(
        \Billing\BillingPlatform $BillingProvider
    ) {
        $this->BillingProvider = $BillingProvider;
    }
}

