mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-17 17:47:13 +00:00
Support generating helper files for real-time facades (#1455)
* Support generating helper files for real-time facades Add changelog entry for real-time facades support Mention real-time facades support in readme Fix code style Import * Remove useless assertions We cannot 100% control the output file has only the real-time facades, anything else can be in the final output
This commit is contained in:
@@ -69,6 +69,16 @@ namespace <?= $namespace == '__root' ? '' : trim($namespace, '\\') ?> {
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php foreach($real_time_facades as $name): ?>
|
||||
<?php $nested = explode('\\', str_replace('\\'.class_basename($name), '', $name)); ?>
|
||||
namespace <?php echo implode('\\', $nested); ?> {
|
||||
/**
|
||||
* @mixin <?= str_replace('Facades', '', $name) ?>
|
||||
*/
|
||||
class <?= class_basename($name) ?> extends <?= str_replace('Facades', '', $name) ?> {}
|
||||
}
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ($helpers) : ?>
|
||||
namespace {
|
||||
<?= $helpers ?>
|
||||
|
||||
Reference in New Issue
Block a user