6 months ago

How to show image in view when upload?

Posted 6 months ago by PaulCatalin97

so, when I upload an image i want to show it after it went up. I use this code and shows me an error pic. How can I display the image in the view with and session message or something else?

    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title">Hover Data Table</h3>
                    </div><!-- /.box-header -->
                    <div class="box-body">
                        <div class="panel-heading"><h2>Aici puteti incarca o imagine pentru profilul dumneavoastra!</h2></div>
                        <div class="panel-body">
                            <div class="alert alert-success">
                                {{ session('success')}}
                            <img src="/imagineemployer/{{ Session::get('path') }}" width="300"/>
                            <div class="alert alert-danger">
                                {{ session('danger')}}
                <form action="{{route('imageuploademployer.update')}}" method="POST" enctype="multipart/form-data">
                    <div class="row">
                        <div class="col-md-6">
                            <input type="file" name="image" class="form-control" value="{{$employerimage->image}}">
                        <div class="col-md-6">

                            <button type="submit" class="btn btn-success">Upload</button>

Please sign in or create an account to participate in this conversation.