Can I add new attribute to an existing table in Laravel Dynamically? - mysql

I am building Dashboard in Laravel with API to Mobile Application.
In the mobile app there is a container that has a Drop Down list connecting to the API to get Department.
When we choose one of the Department another Drop Down list appear contain Department info.
The problem some Department need to show another Drop Down list to choose. For example (the manufacture company) but some Department don't need that.
How can I deal with this problem in database? Is there any way to store this in my database without having null record.
If there is a way how I can send the data in API to mobile app to read the attribute that need to fill?

Related

Store user's state of app in mean stack application

I am using angular 9 and have forms with multiple parts.. like first section about name and personal details, second part about their primary school, third part about users past jobs, etc..
And each part has heading in a side menu.
personal details
primary school
previous job
Clicking on which user can go to that particular part of form..
The question is if the user, completes 2 parts i.e. personal details and primary school and then exits the browser.. the next time when the users logs in.. the first thing I want to display is the 3rd form i.e. previous job to the user.. so that he can continue from there..
Conversely I also want to send an mail to the user stating 'please fill the previous job details in xyz.com'
How to store this kind of data.. can it be done by angular services or need to use NgRx store as must.. if ngrx is needed.. can I somehow store the state in some form in api..
I m using Express with mysql in backend..
Ngrx store is mainly used to have consistant data in more than one component(like user name which should be same in header and profile component). for your scenario ngrx store is not needed, and one more thing, even if you want to use ngrx store when user closes data, you still have to store data in local storage or backend. so that you can use that data when user opens that page.
For your scenario use backend to store data. whenever he comes back to that page, first fetch data and fill it into fields.
Hope it helps. thank you

Creating Drill Down / Master detail navigation/Lookup screen in PowerApps Portal

Problem Statement
We need to create a Drill Down Workflow of screens in PowerApp Portal application where the user can drill down from Parent List to it's child list and so on.
For Example:
-The First screen should list the Phone Brands.
-On clicking any brand->it should bring up a list of Phone Models of that Brand.
-On clicking any phone model, it should bring up the hardware configuration of that phone.
Query:
We have been able add Lists to Child Pages and navigate between pages using the Target type attributes of a List but, we haven't been able to pass the Filter condition from parent screen to child screen
i.e. when the user cliks to drill down from Brands to Models screen.
This results in the Models screen showing Phone models from all brands.
It it simple to achieve the same using PowerApp Canvas application but, we are struggling to achieve the same using Power Apps Portal application.
>>Would appreciate inputs to achieve the same using Power App POrtal Application
you can try to add some query parameter when someone clicks on a brand name in the parent page on the portal and when the user is taken to the child page (model level), there you can read the query parameter to filter.
For readingg query paramter in liquid - https://community.adxstudio.com/products/adxstudio-portals/documentation/configuration-guide/liquid-templates/objects/request/
For adding query parameter on brand click- basic js/jquery should be ok.

RESTful API how to check that sevarel items exists

I am using the mobile application to work with Yii2 RESTful API. In my mobile app I do have a shopping cart with items. So the idea is where user is opening a shopping cart to check that products are still available and have not been sold. So I was thinking to get list of product's id and send a request to RESTful API to check that all of them is fine. If some of them sold I should get back a changed list od products. So far I request my items using this link https://api.website.com/products?product_id=969
What is the good approach to solve this issue? Or in my mobile app I have to create a loop to check each product by one?
A usual practice for use use case you describe is to create an endpoint that accepts a list of IDs, separated by some character (comma, semicolon, etc). For example:
https://api.website.com/products?product_ids=969,970,971
In that action you'd loop over each individual ID in product_ids.

Can groups be expanded when querying which students are associated with a class notebook?

We currently query for the list of students associated with a class notebook via:
/api/v1.0/me/notes/classnotebooks/{id}/students
Should a group be associated with the class notebook then we get principalType=Group and an id in the form:
c:0o.c|federateddirectoryclaimprovider|{id}
So is it possible to expand the members of the associated group(s) within this call? If not, what is the format of this id? To use it via the graph api requires an id so is it safe to assume that the id will always be the 3rd piped element?
Thanks
I ran into this for my application as well. After conferring with the onenote team a few months ago it came down to that you cannot expand these groups inside the onenote api. You must authenticate to the graph api and use the groups functions there. The downside of this is that the graph api permissions to expand a group require an administrator to grant them. So in the end all I could do was recommend the users create class notebooks using the student email list rather than an azure group. (on your final point the format should remain consistent the third piped element is the group id you can pass the graph api)
specifically the below endpoint to get a groups members
'https://graph.microsoft.com/v1.0/myorganization/groups/' . $group_id . '/members'

How can I make the list ordered alphabetically based on the rental properties names?

I am trying to make the list that displays the rows of data to organize alphabetically based on the rental property's name. Right now they are all out of order and I am not sure if this is accomplished through CSS or HTML. The webpage I am speaking of can be found at http://clearwaterfloridabeachrentals2.imbookingsecure.com/rentals/allrentals/
I see that your data is coming through a web service (through Ajax), In this case the web service must send the sorted data to UI. Because even if you achieve sorting of the loaded data (using javaScript that is) your sorting will remain incorrect as the users are able to choose 'load more results' and the new data which will come will again not be sorted.
As a general rule whenever there is a web service to load paginated data (like multiple pages OR scroll to load), it is best if the service itself handles the pagination and the sorting.