Questions tagged [laravel-config]

9 questions
2
votes
2 answers

Change Laravel mail configuration during runtime

I need to change Laravel Mail Configuration during the runtime. This is because the configuration needs to be changed several times during runtime, not just once on app initialization. foreach ($emails as $email) { …
itstare
  • 31
  • 4
1
vote
1 answer

Update laravel config file permanently through a dedicated view

I created a Laravel application with a view which is a form that contains some input fields populated by a laravel configuration file "config.options". I want to update this file through this particular view, I am talking about a standard php file…
silvered.dragon
  • 407
  • 1
  • 7
  • 19
1
vote
1 answer

Laravel Dynamic Filesystem Configuration Set in Controller Level

I'm trying to set filesystem configuration value dynamically in controller level. (I think it's almost impossible). For example: 'sftp' => [ 'driver' => 'sftp', 'host' => env('SFTP_HOST'), 'port' =>…
0
votes
1 answer

Laravel Modules dynamic activation by config

I just recently started working with Laravel 10. I'm using nwidart/laravel-modules v10 for creating modules in my new project. Since the project is going to be an SaaS product, I am also using stancl/tenancy for multiple tenants. I have a config…
0
votes
3 answers

Laravel not getting the APP_URL parameter when we try to use url function inside the blade file

I'm facing a weird situation, just look at the following code in a blade file, and the output of it Blade {{ url('xero_invoice_authorised') }}
config app url - {{ config('app.url') }}
env app url - {{ env('APP_URL')…
Yasitha
  • 901
  • 2
  • 17
  • 42
0
votes
0 answers

Right way to publish custom classes from Laravel Package

Lets say I'm building a laravel package, which has hierarchy like this: PackageContainerClass > *PackageClass* > SomePackageClassMethod() I want to make PackageClass swappable by a class from main App. I know I could create a publishable…
0
votes
1 answer

Seeders in this scenario

I have an email configured in the services.admin.key that has the email of the admin of the app. The app only has one admin. Do you know the best approach so that someone who has access to the code from Git could run a command to configure the user?…
OsG
  • 21
  • 1
  • 8
0
votes
2 answers

Get Config in Routes tested?

I need to make my routes conditional, based on config: //routes/auth.php if (config('auth.allow_registration')) {.... The above config param is set in the config file: //config/auth.php 'allow_registration' => false, It is all working fine,…
Yevgeniy Afanasyev
  • 37,872
  • 26
  • 173
  • 191
-2
votes
1 answer

Check if Config item exists

I would like to know if there is a way to check if a config item exists. I have a case where I refer to some config items in the config/custom.php file, and others in a database table. The concept is to make use of existing config items that exist…
CodingEra
  • 1,313
  • 10
  • 20