Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

For a software dev like me who has no idea how to create a cute hand-drawn dashed line, this course just 100% works.

— Ira Zayats, Developer

pad Modifier

Pad an array to a given number of items with a value. By default the value is null, but you can specify it as the second parameter.

epic_meal_time:
- jack daniels
- bacon strips
{{ epic_meal_time | pad(4, "bacon strips") }}
{{ value }}
{{ /epic_meal_time }}
<?php
$meals = Statamic::modify($epic_meal_time)
->pad(4, 'bacon strips')
->fetch();
?>
 
@foreach ($meals as $meal)
{{ $meal }}
@endforeach
jack daniels
bacon strips
bacon strips
bacon strips
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →