J
J
jazzus2019-01-13 09:25:54
Laravel
jazzus, 2019-01-13 09:25:54

How to combine $request->all() with additional fields?

There are additional fields

$product['slug'] = $slug;
              $product['user_id'] = Auth::id();

There is an extensive list of data from the request
$request->all();
In style Needs to be combined so that later
$request->input('name');
$product->create($product);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alruliov, 2019-01-13
@jazzus

$request['some_value'] = $some_value;

A
Andrey, 2019-01-13
@VladimirAndreev

array_merge?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question