在SQL laravel 5.4中找不到列

I'm trying to publish post with user that register in my app, but this error happened: enter image description here

And I'm using XAMPP and my posts table is this picture enter image description here

And this error is in phpMyAdmin: enter image description here

My PostController is:

use App\Post;

class PostsController extends Controller

{

    public function __construct()
    {
        $this->middleware('auth')->except(['index','show']);
    }

    public function index()
    {
        $posts=Post::latest()->get();

        return view('posts.index',compact('posts'));
    }

    public function show(Post $post)
    {

        return view('posts.show',compact('post'));
    }

    public function create()
    {
        return view('posts.create');
    }

    public function store()
    {

       $this->validate(request(),[
           'title'=>'required',
           'body' => 'required|min:5'
       ]);


        Post::create(request([
           'title' => request('title'),
            'body' => request('body'),
            'user_id' =>auth()->id()
            //auth()->user()->id*/
        ]));

        return redirect()->home;
    }
}

and Post Model:

class Post extends Model
{
    public function comments()
    {
      return $this->hasMany(Comment::class);
    }

    public function user()
    {
      return $this->belongsTo(User::class);
    }
}

It seems your store method is wrong.

Try something like this:

public function store()
{

   $this->validate(request(),[
       'title'=>'required',
       'body' => 'required|min:5'
   ]);

   Post::create([
       'title' => request('title'),
       'body' => request('body'),
       'user_id' =>auth()->id()
   ]);

    return redirect()->home;

}

This code works for you?

INSERT into posts (title, body, userId) VALUES ('My title', 'My body', 7)

The first part specifies the field name, the second part specifies the values you are inserting into each field. 'My title' isn't the field you are inserting info into, it's shown as title.

Also, createdon uses timestamp so you don't need to include that. Updated on could insert a current timestamp once a record is changed.

<?php
if (isset($_POST['submit']))
 {
    include('../dbcon.php');
    $rolno= $_POST['rollno'];
    $name= $_POST['name'];
    $city= $_POST['city'];
    $pcon= $_POST['pcon'];
    $std= $_POST['std'];
    $imagename= $_FILES['simg'] ['name'];
    $tempname= $_FILES['simg'] ['tmp_name'];

    move_uploaded_file($tempname,"../dataimg/$imagename");

    $qry= "SELECT * FROM `student` WHERE `rollno`='$rolno' AND `name`='$name'";
    //$qry="INSERT INTO `student`(`rollno`, `name`, `city`, `pcont`, `standerd`,`image`) VALUES ('$rolno','$name','$city','$pcon','$std','$imagename')";
        echo "$qry";
    $run= mysqli_query($con,$qry);

    if ($run == true)
     {
        ?>
        <script>
            alert('Data Inserted Successfully.');
        </script>
        <?php

    }

} 

?>