use Illuminate\Http\Request;
use App\students;
class PostController extends Controller
{
public function index()
{
$posts = students::all();
return view('welcome')->with('students',$posts);
}
public function create()
{
return view('welcome');
}
public function store(Request $request)
{
$student = new students;
$student->name = $request->input('name');
$student->address = $request->input('address');
$student->number= $request->input('number');
$student->save();
}
Where's the rest of the form? You're just showing a submit button and a close form tag. Show the whole form including the opening form tag, all fields, and the form cllose tag.