Giter Site home page Giter Site logo

Comments (4)

ajthinking avatar ajthinking commented on May 23, 2024 1

Ok now I got it! Makes sense. I like that :) Started on something to facilitate this: https://github.com/pipe-dream/laravel/blob/master/src/resources/js/objectModel/SketchRow.js

from laravel-create.

ajthinking avatar ajthinking commented on May 23, 2024 1

Thanks @Perturbatio ! This is queued in next version, closing for now.

from laravel-create.

ajthinking avatar ajthinking commented on May 23, 2024

Hi @Perturbatio, thank you for this idea, love it.
The Users\Contractor approach would be really cool and don't think there would be a problem with foreign keys as the title can be trimmed after the last \to get the foreign key parameter.

Another method that we discussed is something like this:
<name> : [extra args,,,,,...]
The namespace example could then be added to the end (optionally) something like this:

Contractor : App\Models\Users
name : text, nullable
email 

The last solution is possibly more all around and suitable to be provided by the default "Core package" - but your solution is better for PHP/namespaced languages. Maybe each implementation should have the posibillity to provide its own custom sketch parsing. That would be kind of cool.

Let me know what you think. Cheers!

from laravel-create.

Perturbatio avatar Perturbatio commented on May 23, 2024

If I understand your intention the Contractor in your example is a model with its namespace declared afterwards, I don't think I would have a problem with that, but if I defined the following:

Contractor: App\Models\Users
name
email

Contractor: App\Models\Companies
name

Site
name
contractor_id

How would Site know which contractor is the foreign in this case? My thought was that if I were to do:

Site
name
contractor_id : App\Models\Users\Contractor

I would be implicit about it, maybe I'm not fully understanding your explanation.

from laravel-create.

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.