Comments (4)
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.
Thanks @Perturbatio ! This is queued in next version, closing for now.
from laravel-create.
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.
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)
- Default user and reset password migration removed HOT 3
- failed to open stream: Permission denied HOT 1
- Overriding the templates folder HOT 2
- GUI should keep object model sketch when development server or browser tab is closed. HOT 2
- Ability to create GraphQL type system HOT 3
- Laravel 6 cant generate templates file HOT 2
- Let us add more files after initial file creation HOT 1
- Rebuild doesn't delete old files
- Frontend? HOT 1
- softdeletes doesn't work HOT 4
- API path not working in laravel 6.6.2 HOT 1
- Replacing Route::resource with Route::apiResource HOT 1
- Want to contribute to the project HOT 1
- DataTypes not resolving from __GITHUB_DUMP__
- Broken in Laravel 7 HOT 2
- Closure on route blocks caching routes
- Import existing models HOT 2
- Seeder.php template should use ___MODEL_NAMESPACE___
- license file
- is it possible to create views?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-create.