namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class SharedDataServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->singleton('sharedData', function () {
return (object) [
'maxUploads' => 20, // Maximum file uploads allowed
'apiRateLimit' => 100, // API requests per minute
'theme' => 'dark', // Default UI theme
];
});
}
}
Add the provider to the providers
array in config/app.php
: