Search
 
SCRIPT & CODE EXAMPLE
 

PHP

array inserted in laravel

public function store(Request $request)
{
    for ($i = 1; $i < count($request->en_answer); $i++) {
        $answers[] = [
            'user_id' => Sentinel::getUser()->id,
            'en_answer' => $request->en_answer[$i],
            'question_id' => $request->question_id[$i]
        ];
    }
    EnAnswer::insert($answers);
    return redirect('submitted')->with('status', 'Your answers successfully submitted');
}
Comment

PREVIOUS NEXT
Code Example
Php :: IlluminateDatabaseQueryException SQLSTATE[HY000]: General error: 3780 Referencing column 
Php :: listing table in laravel blade 
Php :: how to check my server use cgi, fcgi or fpm. 
Php :: laravel DomPDF live preview 
Php :: Funktion umgekehrt ausgeben, strrev 
Php :: backend/index.php when deploying 
Php :: laravel where search like with space 
Php :: select all matched text phpstrom 
Php :: php generate html attributes from array 
Php :: get current tax page 
Php :: WooCommerce: Add Content to a Specific Order Email 
Php :: php header x-powered-by 
Php :: get product by author id 
Php :: set session expire time in php 
Php :: vriadic function in php 
Php :: order review checkout page reset woocomerce 
Php :: Laravel Query: orderBy not working with groupBy (with a joined table) 
Php :: simple using mdb with php script PDO 
Php :: Laravel display the date the participation was created 
Php :: Allow mass assignment in Laravel 
Php :: phpImage 
Php :: how to add to array in single without repetation 
Php :: add multi product at the same time using repearter default view laravel 
Php :: php artisan vendor:publish aborted 
Php :: how to check null and empty array in laravel 8 
Php :: remove the public from url in laravel 
Php :: get popular models on laravel 
Php :: import csv file in laravel 
Php :: title active php 
Php :: Change COD default order status to “On Hold” instead of “Processing” in Woocommerce 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =