Why attribute a didn't show in page 2 and so on datatable?

I has make datatable with laravel in simple mode like this <tbody> @php $i = 1; @endphp @foreach ($data_transaction as $item) @php $encrypt = Crypt::encrypt($item->id); @endphp <tr> <td>{{$i}}</td> <td>{{$item->work_order_number}}</td> <td>{{$item->customer_name}}</td> <td>Rp {{number_format($item->details->sum(‘amount’))}}</td> <td> <a href="{{url(‘read-transaction-‘ . $encrypt)}}"><i data-feather="eye"></i></a> </td> </tr> @php $i++; @endphp @endforeach in page one, everything looks ok. But afther that, in page… Read More Why attribute a didn't show in page 2 and so on datatable?

I can't login to my own admin account in a laravel project. I KNOW the details are correct. Using Table Plus

I’m doing a small project. I have a database that is meant to verify logins. I’m creating an Admin Account with my own email, I have the bog-standard error messages of: "Unregistered Email" "Password or Email Incorrect" "Missing Password" etc When I enter JUST my email, my login page recognizes it and doesn’t throw an… Read More I can't login to my own admin account in a laravel project. I KNOW the details are correct. Using Table Plus

How do I avoid having to use isset() in Laravel Blade templates?

I’ve got a Blade file like this: <a href="{{ $url }}" class="{{ $wrapperClass }}"> <p class="{{ $paraClass }}">{{ $title }}</p> </a> And call it like this: <x-mycomponent url="{{ $book->url }}" title={{ $book->title }} wrapper-class="" para-class = "" /> Works great, but whenever I want to add a variable to the component, I need to add… Read More How do I avoid having to use isset() in Laravel Blade templates?

show array item on blade laravel

Arrays: [ {"id":1,"group":"post","name":"Mi","value":"x3 poco"}, {"id":2,"group":"post","name":"iPhone","value":"14 pro"}, {"id":3,"group":"post","name":"Nokia","value":"C5"}, {"id":4,"group":"post","name":"Dell","value":"15 insp"} . . . ] IndexController.php file: $post = Post::all(); return view(‘index’, compact(‘post’)); index.blade.php file: Post Name: "{{ $post->name[‘iPhone’]->value }}" I want to show the output as below: Post Name: "14 pro" But error is showing: Error: Property [name] does not exist on this collection instance. >Solution… Read More show array item on blade laravel

Pass param dynamic when Retrieving Translation Strings

I’m doing a upload many file and trying pass param to get message within for loop, how I can send param index to blade {{__()}} I try do below, input work but label doesn’t work: {{__(‘cha_content.attach1_{{$i}}]’)}} in blade file: @for ($i = 1; $i <= 11; $i++) <div class="form-group row"> <label class="col-sm-3 col-form-label font-weight-bold text-right">{{__(‘cha_content.attach1_{{$i}}]’)}}</label>… Read More Pass param dynamic when Retrieving Translation Strings

Pass param dynamic when Retrieving Translation Strings

I’m doing a upload many file and trying pass param to get message within for loop, how I can send param index to blade {{__()}} I try do below, input work but label doesn’t work: {{__(‘cha_content.attach1_{{$i}}]’)}} in blade file: @for ($i = 1; $i <= 11; $i++) <div class="form-group row"> <label class="col-sm-3 col-form-label font-weight-bold text-right">{{__(‘cha_content.attach1_{{$i}}]’)}}</label>… Read More Pass param dynamic when Retrieving Translation Strings

How to force the second, third… and next rows to show Delete Button in dynamic field in Laravel?

When I fetch data in from datatabse to dynamic form it shows like this. How to force the second, third… and next rows to show DELETE button. I want the first row only to show Add and the rest is delete. My blade code @foreach ($form->requirements as $reqs) <tr> <td><input type="text" name="addMoreInputFields[0][requirement]" placeholder="Enter requirements" value="{{… Read More How to force the second, third… and next rows to show Delete Button in dynamic field in Laravel?

How can i include php file from blade in laravel

Hello Guys In Laravel Blade I Want To Include Php file i try to use @include but it doesn’t work because @include to include views not php file My File I Want To Include App\Helpers\Variables.php $dufaultLang = get_dufault_lang(); $categories = mainCategory::where( ‘translation_lang’, $dufaultLang ) -> Selection() // Select From Selection Scope -> get(); // Get… Read More How can i include php file from blade in laravel