@kk_james Make sure that post route is actually the POST route.
May 22, 2022
4
Level 1
image source not readable
guys i have a file called create.blade.php with a form with input entry and an entry for uploading an image, when i fill the entry and upload the image and hit enter i get an error that image source not readable
and when i hit enter, i get an error that
The GET method is not supported for this route. Supported methods: POST.
here is my create file
@extends('layouts.app')
@section('content')
<form action="/post" enctype="multipart/form-data" method="POST">
@csrf;
<div class="row">
<div class="col-9 offset-2">
<h1>Add New post</h1>
</div>
</div>
<div class="row mb-3">
<div class="col-9 offset-2">
<label for="caption" class="col-md-4 col-form-label">post caption</label>
<div class="col-md-6">
<input id="caption" type="text" class="form-control @error('caption') is-invalid @enderror" name="caption" value="{{ old('caption') }}" autocomplete="caption" autofocus>
@error('caption')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-9 offset-2">
<label for="image" class="col-form-label">image</label>
<input type="file" name="image" class="form-control-file" id="image">
@error('image')
<span class="invalid-feedback" role="alert">
<P>{{ $message }}</P>
</span>
@enderror
</div>
</div>
<div class="row mt-3">
<div class="col-lg-9 offset-2">
<input type="submit" class="btn btn-primary" value="add new post">
</div>
</div>
</form>
here is my web.php
Please or to participate in this conversation.