Skip to content

Commit c1bb5ed

Browse files
Adds compileReadonly function (#42717)
1 parent 753e9fd commit c1bb5ed

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,4 +337,15 @@ protected function compileDisabled($condition)
337337
{
338338
return "<?php if{$condition}: echo 'disabled'; endif; ?>";
339339
}
340+
341+
/**
342+
* Compile a readonly block into valid PHP.
343+
*
344+
* @param string $condition
345+
* @return string
346+
*/
347+
protected function compileReadonly($condition)
348+
{
349+
return "<?php if{$condition}: echo 'readonly'; endif; ?>";
350+
}
340351
}

0 commit comments

Comments
 (0)