Coder Social home page Coder Social logo

The given data was invalid about townhouse HOT 2 CLOSED

mnuhell avatar mnuhell commented on May 23, 2024
The given data was invalid

from townhouse.

Comments (2)

mnuhell avatar mnuhell commented on May 23, 2024 1

Hi @ashokgelal
Yes, change it in the createFrom function.

public static function createFrom($name, $email)
    {

        // Create a Customer
        $customer = new Customer;
        $customer->name = $name;
        $customer->email = $email;
        app(CustomerRepository::class)->create($customer);

        // Associate the customer with a website
        $website = new Website;
        $website->uuid = $name;
        $website->customer_id = $customer->id;
        app(WebsiteRepository::class)->create($website);

        // Associate the website with a hostname
        $hostname = new Hostname;
        $baseUrl = config('app.url_base');
        $hostname->fqdn = "{$name}.{$baseUrl}";
        $hostname->customer_id = $customer->id;
        $hostname->website_id  = $website->id;

        app(HostnameRepository::class)->attach($hostname, $website);
        app(Environment::class)->hostname($hostname);

        $admin = static::makeAdmin($name, $email, str_random());

        return new Tenant($customer, $website, $hostname, $admin);

    }

And my version numbers are

"hyn/multi-tenant": "^5.0",
"laravel/framework": "5.5.*",

Thanks!!

from townhouse.

ashokgelal avatar ashokgelal commented on May 23, 2024

Interesting! I didn't have to change a thing. Where did you change it? Also, can you please check the version number of "hyn/multi-tenant" and "laravel/framework" in your composer.json file for me?

from townhouse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.