Home > Mobile >  @csrf considered as normal html text
@csrf considered as normal html text

Time:10-14

I usually use @csrf on <form></form> to by pass "Page Expired" message on Laravel, but now for some reason, it considered as just normal html text instead of code. I mean the "@csrf" literally shows up on the web page. Does anyone know the problem? It works normally on the other forms though

    <form method="POST" action="/user/usulan/post">
        @csrf
        <input type="text" name="nama" placeholder="Nama" required>
        <input type="text" name="tlp1" placeholder="tlp1" required>
        <input type="text" name="tlp2" placeholder="tlp2" required>
        <input type="text" name="usulan" placeholder="usulan" required>
        <button>Submit</button>
    </form>

CodePudding user response:

Make sure your view file has .blade.php extension.

CodePudding user response:

coba periksa ekstensi filenya, gan

  • Related