hungk53c / hello-world
the first composer package
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:composer
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-10-11 09:24:55 UTC
README
https://viblo.asia/p/tu-tao-composer-package-cho-php-n7prv33ovKod
Cách sử dụng Trên file composer.json của project muốn include package đó cần thêm vào dòng "require": { "kynm/hello-world": "dev-master" } Dùng lệnh : composer update để load package về project Trên file index của project cần require file autoload require_once DIR . '/vendor/autoload.php'; Khi sử dụng chỉ cần sử dụng đúng namespace: use kynm\SayHello\Sayhello; $hello = new SayHello(); echo $hello->world();