About 70,300 results
Open links in new tab
  1. php - Creating Combinations from the array - Laravel

    Sep 9, 2020 · I am trying to create Product Combinations from the response I am received through Form. How do I pass the array items to the collect so that the combination is created $newContent = array();...

  2. Proper way of using Laravel Collect for creating combination

    Sep 9, 2020 · Alternative, without Laravel collection: <?php $input = json_decode('{"1":["Medium", "Large"],"2":["White", "Blue"]}', true); foreach($input[1] as $in1) { foreach($input[2] as $in2) { $out[] = $in1 . '-' . $in2; } } return $out; // ['Medium-White', 'Medium-Blue', 'Large-White', 'Large-Blue']

  3. Laravel 5: Creating Combinations of Elements With crossJoin

    Apr 11, 2018 · The crossJoin method in Laravel's Illuminate\Support\Arr class allows you to combine input arrays, resulting in an array containing all possible combinations of the input values. Through an example, let's say we want to create a deck of cards.

  4. Laravel 5 Collections: Creating Combination of Elements With …

    Apr 22, 2018 · The crossJoin method is used to join the items within the collection instance with the values of the input arrays, or collections, with all possible permutations expressed. The final output of the crossJoin method will be a Cartesian product, which can be useful for representing matrices, or to easily determine the cardinality of a combination ...

  5. Combining Collections with Laravel's crossJoin() method

    Jun 6, 2024 · The Laravel Collection class offers numerous methods to manipulate and combine data. One particularly powerful method is crossJoin() , which generates a Cartesian product of collections. This can be extremely useful for creating combinations from multiple data sets.

  6. laravel - generating combinations given variable user input

    Jun 28, 2018 · I want to generate all combinations of what input user specifies. For example if user inputs (a,b) my code should generate (a1,b1) , (a1,b2) If user inputs (b,c) my code should generate (b1,c1), (b1,c2), (b2,c1), (b2,c2)

  7. Laravel: Dynamic Array Input Form Field Example - Leonel Elimpe

    Sep 23, 2020 · Essentially, make phone_restrictions an array input field and add Javascript functionality to dynamically add new inputs to the array, then save to the database. Let’s dive in. phone_restrictions is set up as a json column on the promotions table.

  8. Collections - Laravel 12.x - The PHP Framework For Web Artisans

    Since collect () is part of the Enumerable contract, you can safely use it to get a Collection instance. The combine method combines the values of the collection, as keys, with the values of another array or collection:

  9. MoseyM/matrix-multiplication-with-laravel - GitHub

    This is a Lumen application that takes some input from a GET endpoint and parses it into a matrixwhere the numeric values are its alpha representation (ie 1 => A, 28 => AC).

  10. updivision/matrix-php-sdk: Matrix SDK for PHP - Laravel - GitHub

    This is a package for using a Matrix chat client into a Laravel Project. You can find the Matrix Client-Server API documentation on Matrix.org website. To get started with Matrix PHP SDK, use Composer to add the package to your project's dependencies:

  11. Some results have been removed
Refresh