Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
110 views

I am working on a Laravel project and I have a Blade component for displaying a data table. However, I am encountering an Undefined variable $data error when trying to pass data from my controller to ...
KOKO's user avatar
  • 3
-1 votes
1 answer
81 views

I've come back to a Laravel project having been away from coding to deal with a personal situation. Now I've hit a brick wall. I'm getting an "Undefined variable" error which I don't know ...
Graeme Robinson's user avatar
0 votes
2 answers
596 views

I'm working with Laravel v10 and in my project I tried the following to make a custom component with livewire. I ran: php artisan make:component CounterDisplay created a new file named: resources/...
Peter Amo's user avatar
  • 261
0 votes
1 answer
473 views

im trying to display data from the database from the trix editor using laravel livewire. The content gets saved in the database but after i reload content disappears from the page even though the ...
kristi tanellari's user avatar
2 votes
1 answer
749 views

I have created a Laravel Component and it works fine on my local machine, but when I deploy the project to the hosting it stops working there and the error Undefined variable $navbar occurs. app\View\...
user avatar
0 votes
1 answer
427 views

I have this component: class CategorySelect extends Component { public $id_name, $selected; public function __construct($selected=-1, $id_name="default_id") { $this->...
yossi's user avatar
  • 3,174
1 vote
0 answers
370 views

In laravel 9 I have ProductCardReport component which is on blade form and data are retrieved from ReportProduct class. I got data with firstOrFail in this class and I failed to catch this error in ...
mstdmstd's user avatar
  • 3,309
0 votes
0 answers
337 views

In laravel 9 I have component which I created with command php artisan make:component ProductCardReport In app/View/Components/ProductCardReport.php I get some data with eloquent : <?php ...
mstdmstd's user avatar
  • 3,309
1 vote
2 answers
226 views

In laravel 9 app I created class app/Implementations/LocalStorageUploadedFileManagement.php : <?php namespace App\Implementations; use App\Interfaces\UploadedFileManagement; ... use Intervention\...
mstdmstd's user avatar
  • 3,309
0 votes
1 answer
635 views

@foreach (($loop->index == 3 ? FILTER_OPTION_NEW_EXISTING : ($loop->index == 4 ? $franchiseTypes : $categories)) as ($loop->index == 3 ? $key => $value : $item)) How can I attain this one?...
MDB's user avatar
  • 360
3 votes
1 answer
4k views

As an example there is this component: resources/views/components/example.blade.php <div> @if($foo === "bar") Bar @else Foo @endif </div> that I ...
JanBoehmer's user avatar
0 votes
1 answer
924 views

I would like to create one "parent" component class that can render multiple different views based on which "child" view you pass in. For example, I would like to create a ...
rileys's user avatar
  • 91
1 vote
1 answer
86 views

I just encounter a situation where I need to display index for each row of table, For this I created a variable ($number) in blade view file and set it to 0. For row of my table I created a component ...
Usama Jalal's user avatar
0 votes
2 answers
513 views

I have a file called all.blade.php which goes like this: @component('admin.layouts.content' , ['title' => 'example file']) @slot('breadcrumb') <li class="breadcrumb-item active&...
Peter Amo's user avatar
  • 261
0 votes
1 answer
191 views

I'm working with Laravel 8 and I have a master.blade.php goes like this: <!DOCTYPE html> <html> <head> <!-- including scripts and stylesheets --> </head> &...
Peter Amo's user avatar
  • 261
0 votes
0 answers
277 views

i have upgraded from laravel 6 to 7 then 8 then 9 and make:component command not exist how to update it ?
khaled el wakeel's user avatar
0 votes
1 answer
3k views

The @aware Laravel Blade template directive was introduced in Laravel 8, but I still don't understand what it does differently from the already existing @props directive. For instance, if I use a ...
Udochukwu Enwerem's user avatar
5 votes
3 answers
18k views

I have made a laravel component using php artisan make:component testcomponent for which two files are created; one is blade and second one is php class file. here is the blade file: <div> {{...
Hammad Butt's user avatar
7 votes
0 answers
3k views

I'm wondering if it is worth moving from this code. @extends('layouts.app') @section('title', 'Page Title') @section('content') @foreach ($tasks as $task) {{ $task }} @endforeach @...
Issa Abdulaziz's user avatar
1 vote
0 answers
1k views

I'm trying to implement an EasyCRUD full page component that would permit basic operations on indicated model. Just for the simplicity, all models would have the same structure (id, name, timestamps, ...
dmikam's user avatar
  • 1,102
0 votes
1 answer
870 views

<div class="bg-white dark:bg-custom-black-600 dark:text-white rounded px-4 pb-4 pt-2"> <div class="flex-shrink-0 flex justify-between items-center"> <h4 ...
Nils Vennemann's user avatar
0 votes
1 answer
543 views

I can not see my variable in component Controller class DigitalContentController extends Controller { public function productsList(){ $contents = DigitalContent::all(); return view(...
CC7052's user avatar
  • 577
6 votes
1 answer
14k views

I have the following blade component in laravel. I am using tailwind. located in views/components/indigo-button-sm.blade.php <button {{ $attributes->merge(['type' => 'button', 'class' => '...
Robert Bryan Davis's user avatar
0 votes
2 answers
2k views

I am learning laravel on Laracast however I am having some issues I have this code on file components/layout.blade.php <!DOCTYPE html> <head> <title>Host Cloud Template - ...
BIDS Salvaterra's user avatar
0 votes
1 answer
4k views

I'm trying to learn laravel and I'm trying to use some components. I've created a layout component which is including the navbar and it's correctly working. I'm still working with key/values arrays ...
gianmarco varrone's user avatar
2 votes
0 answers
622 views

I have a component table <x-table :rows="$rowsArray"></x-table> I pass array of arrays where each inner array represents <tr> row to be printed. $rowsArray = [ ['name'=&...
Marko's user avatar
  • 419
0 votes
0 answers
291 views

I made a table using yajra datatables, everything works fine (buttons, table title, table data, editing, etc.) (Listing 1). Now I am trying to implement this using Laravel 8 components, but I do not ...
volnistii11's user avatar
3 votes
3 answers
3k views

I have defied a generic input component in Laravel like this: //file: views/components/input.balde.php <input @foreach ($attrs as $attr=>$val) {{ $attr }} = "{{ $val }}&...
Lamar's user avatar
  • 1,859
0 votes
1 answer
913 views

In a Laravel component, you can specify default classes and merge them with extra classes that get passed in, something like this: <a {{ $attributes->merge(['class' => 'text-white']) }}>{{ ...
Magmatic's user avatar
  • 2,009
0 votes
0 answers
763 views

I've recently started working with Laravel during one of my courses and those components look really promising. One problem though, that I've come across, is passing data from, let's say, the ...
Nicolas Rouleau's user avatar
5 votes
2 answers
5k views

In old-style Laravel blade templated we used to use @section('section-name') in the following way: {{-- h1para.blade.php --}} <h1> @section('heading') Heading from Template @...
cartbeforehorse's user avatar
4 votes
1 answer
695 views

I created 2 components: layouts/app.blade.php and navigation.blade.php The layouts/app.blade.php looks like this: <body> @stack('styles') <x-navigation/> </body> The ...
Ioan Andrei's user avatar
0 votes
1 answer
288 views

Heres the output to the screen if I dd() in the render method Illuminate\Support\Collection {#1355 ▼ #items: array:1 [▼ 0 => {#1360 ▼ +"provider": "provider" +&...
Quickee's user avatar
  • 331
1 vote
1 answer
2k views

I'm trying to reuse the same HTML code in both PHP and Javascript. In PHP I'm using Laravel's component mechanism to load the file passing the necessary parameters. @foreach($files as $file) <x-...
Mayeenul Islam's user avatar
0 votes
1 answer
843 views

<?php namespace App\View\Components; use Illuminate\View\Component; class Admin.-newclubform extends Component { /** * Create a new component instance. * * @return void *...
V-CHHETRI's user avatar
0 votes
1 answer
784 views

I have a laravel component <section class="section {{ $classes }}"> <div class="inner"> <h1>{{ $heading }}</h1> <h2>{{ $subheading }}&...
LeBlaireau's user avatar
  • 17.5k