Header Ads

[FIXED] 500 internal server error ONLY if the column is not null | What is error 500 null?[POSTMAN]

 500 internal server error ONLY if the column is not null | What is error 500 null?

Below you can see the error how it will be in Postman while testing the API



"file": "C:\\xampp\\htdocs\\quoteApi\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php",

In above image you can see the error if there is value present then also getting the same error
For Details you can Watch video Below:




To solve the above errror follow the below steps and you can see in video also

1. Check  all the columns name as per your database both should be same.
2. Check the Request whether it is correct as per your API
3. Check the API table name and Column name it should be same as Database.
4. Important point 

   function addProduct(Request $req){

    $product = new productModel;
    $product->p_name=$req->input('name');
    $product->price=$req->input('price1');
    $product->description=$req->input('description');
    $product->file_path=$req->file('file')->store('products');
    $product->save();
    return "Hello";

    }

check you Controller     $product->p_name=$req->input('name1');



and Postman Input field both should match then only it will work as you
expected otherwise it will give an above error...



For More Details :

Contact : info@infysky.com


No comments

Blinking TWO Led's with Arduino and Breadboard #03

Blinking TWO Led's with Arduino and Breadboard In this tutorial we will see how to turn on two Led's using Arduino Uno for beginn...

Powered by Blogger.