Skip to content

PHP code snippet – How to pass write post method in lumen?

$app->post('insertGender', function (Illuminate\Http\Request $request) {
        $NAME = $request->input('NAME');
        $result = DB::insert("INSERT INTO HK_GENDER (NAME) VALUES (?)",[$NAME]);
        return ($result)? "wow":"Noo";
    });
See also  Python code snippet - How to return an html file in flask?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.