Laravel-5-Generators-Extended | package extends the core file generators | Build Tool library
kandi X-RAY | Laravel-5-Generators-Extended Summary
kandi X-RAY | Laravel-5-Generators-Extended Summary
This package extends the core file generators that are included with Laravel 5
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create the down method for the down method .
- Parse the schema .
- Create the schema for the up method .
- Normalize action name .
- Parse the field delimiter
- It creates the PHP syntax .
- Make migration .
- Replace the schema .
- Get table name .
- Make the model .
Laravel-5-Generators-Extended Key Features
Laravel-5-Generators-Extended Examples and Code Snippets
Community Discussions
Trending Discussions on Laravel-5-Generators-Extended
QUESTION
Coming from a long Symfony-Doctrine background, I have started learning Laravel 8.
One of my first discovery was that migration needed to be manually created after using make:migration
(from what I understood thus far) in both Models and Migration.
Symfony, with Doctrine, allowed a bunch of automatisation, and I only needed to create the field or relation from the Model (php annotation or yaml) - before launching doctrine:schema:validate
and make:migration
https://symfony.com/doc/current/doctrine.html#migrations-adding-more-fields.
Let 'say I create a Post and Comment entity, with a One-To-Many relationship.
If I define the relation in the php classes
ANSWER
Answered 2021-May-25 at 08:19In laravel framework despite other famous fameworks like symfony or python django, you're responsible for making database migration files. By this way, you are free to customize your database schema and add any database constrains like (unique constrain, relation constrains and etc.). Also you can add any raw sql using \DB::unprepared();
in your migration files.
I can tell you that it is normal to be a little confuse about this flow, because you've used to this kind of automation in other frameworks like I did, but beilieve me, you get to used to this flow.
By the way, there are some packages out there that do this automation (create migration files according to model) for you.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Laravel-5-Generators-Extended
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page