php - Laravel Edit forms shows blank screen first load
Get the solution ↓↓↓Laravel Crud operation
When i open the edit option initially from button link it shows me blank screen as attached in both browser Chrome and FireFox
But when i reload it from the URL by hitting enter it loads the screen
Also when i save the form it return me the GIF image in ajax response. the module name is advertisement
Is there possibilities the word advertisement can cause the issue?
AdvtController.php
public function edit($uuid)
{
Languages::setBackLang();
$checkPermission = Permissions::checkActionPermission('edit_advertisement');
if ($checkPermission == false) {
return view('backend.access-denied');
}
$advertisementData = Advertisement::loadAdvertise($uuid, Languages::EN);
if (empty($advertisementData)) {
Helper::log('Advertisement edit : No record found');
return redirect()->back()->with('error', trans('backend/common.oops'));
}
$languages = Languages::where('language_id', Languages::EN)->select('language_id', 'name')->first();
$language_id = Languages::getBackLanguageId();
return view('backend.advertisement.edit', compact('languages', 'advertisementData'));
}
edit.blade.php
@extends('backend.layout')
@php
$lang = \App\Models\Languages::getBackLang();
@endphp
@section('scripts')
<script src="{{asset('backend/dist/js/jquery.validate.min.js')}}"></script>
<script src="{{asset('backend/dist/js/pages/custom.js')}}"></script>
<script src="{{asset('backend/dist/js/pages/advt.js')}}"></script>
@endsection
@section('content')
<div class="content-wrapper">
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0 text-dark">{{trans('backend/advertisement.advertisement')}}</h1>
</div><!-- /.col -->
<div class="col-sm-6">
<ol class="breadcrumb {{($lang == 'ar') ? 'float-sm-left':'float-sm-right'}} ">
<li class="breadcrumb-item"><a
href="{{route('admin.home')}}">{{trans('backend/common.home')}}</a></li>
<li class="breadcrumb-item"><a
href="{{route('admin.advt.index')}}">{{trans('backend/advertisement.advertisement')}}</a>
</li>
<li class="breadcrumb-item active">{{trans('backend/common.edit')}}</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</section>
<!-- /.content-header -->
<section class="content">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">{{trans('backend/advertisement.edit_advertisement')}}</h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<div id="display_message" class="col-md-12 display-none">
<div class="alert display-none alert-success"></div>
<div class="alert display-none alert-danger"></div>
</div>
@include('backend.advertisement.form')
</div>
<!-- /.card-body -->
</div>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
</div>
@endsection
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: the requested url was not found on this server. xampp
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.