laravel array append code example
Example 1: array_push
$array[$key] = $value;
// or
$array[] = $value;
// or
array_push($array, [ mixed $... ]);
Example 2: php add element to array
<?php
$stack = array("orange", "banana");
array_push($stack, "apple", "raspberry");
?>