而不是输入有一些东西 HTML
Instead of input there is something HTML
我制作了一个简单的聊天应用程序,我希望用户不必输入他们的名字 HTML 填写我拥有的一切但不知道如何去做我将在下面列出代码
<form action="/create" method="post">
{{ Auth::user()->name }} // This is what i want
<input type="text" name="title" placeholder="Name"> // In here insted of user typeing it
<input type="text" name="content" placeholder="Content">
{{ csrf_field() }}
<button type="submit">Send Message</button>
</form>
使用这个:
<input type="text" name="title" value="{{ Auth::user()->name }}">
我制作了一个简单的聊天应用程序,我希望用户不必输入他们的名字 HTML 填写我拥有的一切但不知道如何去做我将在下面列出代码
<form action="/create" method="post">
{{ Auth::user()->name }} // This is what i want
<input type="text" name="title" placeholder="Name"> // In here insted of user typeing it
<input type="text" name="content" placeholder="Content">
{{ csrf_field() }}
<button type="submit">Send Message</button>
</form>
使用这个:
<input type="text" name="title" value="{{ Auth::user()->name }}">