Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

push collection php

$collection = collect([1, 2, 3, 4]);

$collection->push(5);

$collection->all();

// [1, 2, 3, 4, 5]
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #push #collection #php
ADD COMMENT
Topic
Name
5+9 =