Category : laravel-blade

I have a small problem with Laravel: This is my web.php Route::get(‘contakt/{code?}’, function ($code = "null") { return view(‘contakt’,compact(‘code’)); })->name("contakt"); And this is my Page: @if (strcmp($code,"success")) <div class="contact-form-success alert alert-success d-none mt-4" id="contactSuccess"> <strong>Success!</strong> </div> @endif When i var_dump out on the contact page the content of $code this is the result: …/storage/framework/views/8ebd5bc41eecbc72e9a5480450fe96d3ba115d33.php:81:string ‘success’ ..

Read more

I need to use pagination on a laravel blade, but from the controller comes another variable that does not pass pagination, how can I solve it? <div class="main-content"> <div class="breadcrumb"> <h1>Página de Cliente</h1> </div> <div class="separator-breadcrumb border-top"></div> <div class="card user-profile o-hidden mb-4"> <div class="user-info"><img class="profile-picture avatar-lg mb-2" alt="" /> <p class="m-0 text-24">{{ $customer->name }}</p> <p ..

Read more

I have a problem making the files downloadable after unzipping. And show in blade table with name of file, size of file and download button. Name and size is done in foraach. Problem is how to make the file downloadable. Error: Cannot use object of type SymfonyComponentHttpFoundationBinaryFileReponse as Array in page.blade.php Firstly ZipArchive extension: $ziparchive ..

Read more

I have a weird problem with the syntax of laravel (version 7) {{ }}, where I use PHP syntax like that: <?php echo $thread->lastReply->user->name; ?> I get my user displayed but with the blade syntax : {{$thread->lastReply->user->name}} I got this error: ErrorException Trying to get property ‘user’ of non-object where could the problem come from? ..

Read more

In a create post form i have store the data into database using implode function because data was in array $this->posts->optional_info = implode(" ",$input[‘optional_info’]); now In edit form i want the data stored in database should get checked by default in view so i am trying like <div class="row"> @foreach($customArray[‘optional’] as $key => $value) <div ..

Read more

so i stored array of images while created a form, but i store these in local public folder not in database. //controller public function store(Request $request) { if($request->hasFile(‘files’)) { foreach($request->file(‘files’) as $image) { $destinationPath = ‘public/uploads/’; $filename = $request->input(‘surf_date’).’_’.$request->input(‘user_id’).’_’.$image->getClientOriginalName(); $image->move($destinationPath, $filename); } } $data = $request->all(); $rules = array( ‘post_type’ => [‘required’], ‘user_id’ => [‘required’,’numeric’], ..

Read more

so i am working on share post kind of form,i am getting the image by input field <div class="videoImageUploader"> <div class="upload-btn-wrapper"> <button class="">click to upload</button> <input type="file" id="input_multifileSelect" name="files[]" accept=".png, .jpg, .jpeg" multiple /> <input type="hidden" id="imagebase64Multi" name="surf_image_array[]" accept=".png, .jpg, .jpeg" multiple /> </div> </div> this i had input field which maybe incorrect and also ..

Read more

i am getting the date in blade form from controller in format like 2020-11-24(y-m-d) and i want to use this in input field value property <div class="row"> <div class="col-md-4"> <label>Surf Date <span class="required">*</span></label> </div> <div class="col-md-8"> <div class="selectWrap pos-rel"> <input class="form-control" type="date" name="surf_date" id="datepicker" value="{{ old(‘surf_date’),$posts->surf_start_date }}" required /> </div> </div> </div> but it does ..

Read more