Answer the question
In order to leave comments, you need to log in
How to add a class in composer?
There is a module structure in the vendor folder:
In composer.json:
{
"name": "test/log",
"description": "",
"type": "library",
"license": "MIT",
"minimum-stability": "dev",
"require": {
"php": "^5.6 || ^7.0"
},
"autoload": {
"psr-4": {
"Log\\": "src/"
}
}
}
<?php
namespace Testspace;
class Log
{
public static function test()
{
echo 1;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question