You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone, I'm facing a problem in a project named pfDev Laravel 7:
I've 8 components in resources > views > components and their related classes located in app > view > components. Accessing a component named 'mobile.blade.php' with following code: Code in resources > views > home.blade.php <x-mobile :mob="$m"></x-mobile> Code in app > Views > Components > Mobile.php
public $mob;
public function __construct($mob)
{
$this->mob = $mob;
}
Code in resources > views > components > mobile.blade.php <h1> {{ $mob }} </h1> working fine on: localhost:8000
BUT SHOWING ERROR $mob is undefined on: localhost/pfDev AND on shared hosting domain.com
I've registered the component manually in app > Providers > AppServiceProvider.php as:
public function boot()
{
Blade::component('mobile', Mobile::class);
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I'm facing a problem in a project named pfDev Laravel 7:
I've 8 components in resources > views > components and their related classes located in app > view > components. Accessing a component named 'mobile.blade.php' with following code:
Code in resources > views > home.blade.php
<x-mobile :mob="$m"></x-mobile>
Code in app > Views > Components > Mobile.php
Code in resources > views > components > mobile.blade.php
<h1> {{ $mob }} </h1>
working fine on: localhost:8000
BUT SHOWING ERROR $mob is undefined on: localhost/pfDev AND on shared hosting domain.com
I've registered the component manually in app > Providers > AppServiceProvider.php as:
Beta Was this translation helpful? Give feedback.
All reactions