how to input request data elements into an array laravel code example Example: laravel request has if ($request->has('name')) { // }