Welcome Guest, Not a member yet? Register   Sign In
Setting baseURL in Registrar not working
#6

(This post was last modified: 05-21-2025, 11:49 AM by grimpirate.)

If it's never invoked how did you get the fatal error that is being thrown? The error is saying that you defined your baseURL as '/' in Config/App.php. Which is why the application fails. Your namespace is also wrong in your registrar, it's not namespace Config; it should be namespace App/Config;, which is perhaps another reason it isn't working.

EDIT:
Make the baseURL line in your Config/App.php the following:
PHP Code:
public string $baseURL 'http://192.168.0.1:81/'
And then make your Registrar
PHP Code:
<?php

namespace App\Config;

class 
Registrar
{
    public static function App(): array
    {
        if(ENVIRONMENT == 'staging')
                return ['baseURL' => 'http://mydomain.com/'];
        return [];
    }

Reply


Messages In This Thread
RE: Setting baseURL in Registrar not working - by grimpirate - 05-21-2025, 10:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB