Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel validation on update

public function controllerName(Request $request, $id)
{
    $this->validate($request, [
        "form_field_name" => 'required|unique:db_table_name,db_table_column_name,'.$id
    ]);
    // the rest code
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #validation #update
ADD COMMENT
Topic
Name
1+7 =