use Ebess\LaravelInertiaSharedDataProvider\Contracts\InertiaSharedDataProvider;
class FooBarSharedDataProvider implements InertiaSharedDataProvider
{
public function provide(Request $request): array
{
return [
'foo' => 'bar',
];
}
}
use Ebess\LaravelInertiaSharedDataProvider\Contracts\InertiaSharedDataProvider;
class AppServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->tag(
FooBarSharedDataProvider::class,
InertiaSharedDataProvider::TAG_NAME
);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.