Master Detail ( Laravel CRUD V2 )
In laravel CRUD and CMS v2 , master detail is feature for filtering rows detail by spesific field , ID from master table.Example you have rows master detail :
The picture showing you where invoce table related to invoiceline table with 'InvoiceId' key relation.
We used call it "One to Many " relation, where every row on table invoice will have one or more rows detail in invoiceline table .
Ok let's turn the logic into real application .
Step 1
- Create 2 modules , Invoice and Invoiceline ( please see previous tutorial creating module )
http://mangsoft.blogspot.com/2014/03/create-simple-crud-laravel-41-using.html
Step 2 .
Create new menu for Invoice module
Step 3
Edit module Invoice and go to master detail tab :
Fill in form field as illustrated image above . then save master detail
Now go to Invoice module , you will see new menu at dropdown button at every rows.
Test it by clicking link 'View orders detail' .
it will bring you to invoiceline module , with header information about master row details.
It's Easy right ? so why you dont try it by your self .
View Demo Page
Good Luck !!
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment