Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
development:php [2020/03/03 10:37] kalenpw |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP ====== | ||
- | * [[.php : laravel | Laravel ]] | ||
- | * [[.php : xdebug | Xdebug ]] | ||
- | ---- | ||
- | ===== PSR4 Autoloading ===== | ||
- | add the following to '' | ||
- | <code json> | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | </ | ||
- | '' | ||
- | eg: | ||
- | <code php> | ||
- | namesapce App\Util\Whatever; | ||
- | </ | ||
- | |||
- | Now generate autoload.php | ||
- | <code bash> | ||
- | composer dump-autoload -o | ||
- | </ | ||
- | |||
- | In core PHP file include '' | ||
- | <code php> | ||
- | require_once(' | ||
- | </ | ||
- | |||
- | Then simply give each file a namespace matching its directory and '' |