Category : html

Guys, please i need help to extract numbers from a string with the preg_match_all functions in my laravel blade view and add the numbers i got, i tried, but i get an error that says htmlspecialchars() expects parameter 1 to be string, array given (View: /home/bryngrgz/resources/views/retailer/orderview.blade.php). @php $vari = [{"shipcost":"1500"}][{"shipcost":"1000"}]; preg_match_all(‘!d+!’, $vari, $matches); echo $matches ..

Read more

I’ve been googling about this and came across this solution: $(function() { $(window).on("scroll", function() { if($(window).scrollTop() > 50) { $(".header").addClass("active"); } else { //remove the background property so it comes transparent again $(".header").removeClass("active"); } }); }); Here’s the CSS: header{ display: flex; position: fixed; top: 0; left: 0; width: 100%; background-color: transparent; height: 70px; align-items: ..

Read more

My images were working fine, but right now i have a problem with my storage directory. Before they were going here : But now they are going here : My code Profile Controller : if($r->hasFile(‘profile_avatar’)){ Auth::user()->update([ ‘profile_avatar’ => $r->profile_avatar->store(‘public/avatars’) ]); } if($r->hasFile(‘banner’)){ Auth::user()->profile()->update([ ‘banner’ => $r->banner->store(‘public/avatars’) ]); } Session::flash(‘success’, ‘Perfil Atualizado com Sucesso!’); return redirect()->back(); ..

Read more

i’m trying to make a transition effect to text in livewire its working with {{ $html }} <p class="text-gray-600" x-data="{show: false}" x-show.transition.duration.1000ms="show" x-init="setTimeout(() => { show = true })" id="{{ $slide[‘current’][‘id’] }}c">{{ ‘<h1>hi</h1>’ }}</p> but it didn’t work with {!! $html !!}} <p class="text-gray-600" x-data="{show: false}" x-show.transition.duration.1000ms="show" x-init="setTimeout(() => { show = true })" id="{{ ..

Read more

I’m trying to create the following page: Table Basically, I have troubles to know the best way to add new rows. This is my html file: <h1 class="text-center">Realziar Pedido</h1> <strong>Indústria: </strong> {{$empresa->nome}} <br><br> <table class="tabela-industrias table-bordered table-striped" id="orders"> <thead> <tr> <th scope="col" class="table-head">Product</th> <th scope="col" class="table-head">Price</th> <th scope="col" class="table-head">Quantity</th> <th scope="col" class="table-head">Total</th> <th scope="col" class="table-head ..

Read more

I am using laravel to develop an app that require an array of select option My code <select name="test_id[]" class="form-control select-test-{{$idselect}}" id="select-{{IlluminateSupportStr::random(10)}}"> <option value="">Select Patient Test</option> @foreach ($tests as $item) <option value="{{$item->id}}">{{$item->name}}</option> @endforeach </select> Laravel validation code $request->validate([ ‘test_id’ => ‘required:array’ ], [ ‘test_id.required’ => "Test is required" ]); it goes through even when no ..

Read more

I have a checkbox which will re-enable all input textboxes in a row if checked. The current state is I can only do it on the first row. This is my code: @foreach($kucings as $cat) <tr> <th scope="row"> <input type="hidden" name="" value=""> <input type="checkbox" id="name" name="name" value="{{$cat->id}}"/>&nbsp;&nbsp; {{$cat->name}} </th> <td><input type="number" id="age" value="" disabled /></td> ..

Read more

In my Laravel-5.8 application, I tried to load the company Logo from a folder into the header of the page: <a href=”{{ route(‘home’) }}” class=”brand-link logo-switch navbar-dark bg-gray-light”> <img src=”public/storage/myLogo.png” alt=”MyApp” class=”brand-image-xl logo-xs”> <img src=”public/storage/myLogo.png” alt=”MyApp” class=”brand-image-xs logo-xl” style=”left: 12px”> </a> I called it this way: @include(‘layouts.partials.brand-logo’) I observed that on the main menu, the ..

Read more

I have been trying html_entity_decode as below; //Foreach ($datas from remote db) $recorded = User::updateOrCreate([ "old_id" => $user->Id, "username" => $user->UserName, ],[ "old_id" => $user->Id, "name" => html_entity_decode($user->FullName), "username" => $user->UserName ] and it gives me an error like as follow, SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘xE3xBCseyi…’ for column `database`.`users`.`name` at row ..

Read more

I am making laravel cms system using ckeditor now. However, ckeditor changes may source code, it means when I copy and paste html to ckeditor in Source code status, after that, I reopen html in Source code status, html is already changed. Html is as follows; <section class="page-link"> <div class="container"> <div class="page-link__box"> <div class="page-link__box__cont"> <div ..

Read more

I am trying to change the quantity of the order in my cart page. It works fine when I run it at my localhost, but won’t change its quantity when running it in my hosting. Here is what the error looks like in the console: And here is what my script looks like: Any solutions? ..

Read more

Simple issue, the login page instead comes up as a white screen with a "404 not found" error. I will post the code for my index page that should have the working link to log in. All the things I’m using with this project are all up to date (Laravel itself, Phpstorm, composer etc.). <!DOCTYPE ..

Read more