Accessing database data in Laravel Spark kiosk settings - laravel

I have added a new page under kiosk settings under API keys. On my new panel I have a select box and I need to populate it with values from a database table.
I'm not sure how to best do this. There seems to be this Spark.state object where the user and team values are put, so if I guess this might be a place.
Or else I load it with Ajax???
This is so easy in normal Laravel I just pass the object from the controller to the view and build the box on the blade view.
Am I missing something? How would i best do this?
Thanks

The way Spark is built with inline-templates, you can still use blade like normal.
You've created the new link in the menu sidebar, so now copy what the other settings are doing by having a tabcard be displayed when the menu item is clicked.
I recommend creating a new blade file for your new menu item and including it in that tabcard. You'll see some examples in the Spark settings blade file. Because you're using blade to render it, you don't need to load anything through AJAX.

Related

How do I get Magento 2 data to use in the template?

I am starting in the Magento development world, and I'm creating a new theme.
On my theme, I have a block which displays business contact info, but I don't know how to get the data from the store.
I have to make a custom menu as well, but stop in the same problem: getting category data from the store.
I also wanted to know if there is any place where you can find more references on this data return issue, such as what available methods and classes are available, for example.
Where do you want to display the custom data ? In a product page or your custom module's separate page ?
If you want to use custom block in sidebar you can follow steps given here
https://aureatelabs.com/magento-2/how-to-add-a-static-block-in-a-sidebar-column-magento-2/.
Here are some ref you can use:
https://itectec.com/magento/magento-magento-2-get-custom-module-data-in-theme-phtml/
https://code.vky.co.in/display-custom-module-collection-data-frontend-magento-2/

How to make create form on Laravel Nova shown as modal

I'am recenly used laravel nova as my CMS. but I still confuse to create modal when create resource button clicked. I was tried to use Resource tool but I got error the resource not found.
my goal, just want to displaying create user form as a modal. so, when user click create user button in this following image. popup will shown instead of redirecting to another page
anyone can help me, please.
Thanks in advance
This old Nova plugin still works, (Nova 3.29), though it's hardcoded for a primaryKey of id and has a few minor bugs.
https://github.com/ahmed-m-hussain/nova-Hasmany-To-Modal-Popup

Loading Laravel blase views using Vue

I have a Laravel project with a dashboard that contains a side menu. When navigating through this side menu, it refreshes the whole page (layout & view in blade). This is my dashboard:
1
I want to know how I'm able to load my blade views without page refresh. So that when I'm clicking on a navigation link, only the yielded content changes. How am I able to achieve this? Please don't mark this as a dublicate as I've visited most of the similar topics but without any succes.
Oh, and I'd appriciate it so bad if there's someone that's willing to help me out using Teamview.
views cannot be loaded that way with laravel. you will need to use components to design your pages with vue. with components in place you can now use vuerouter to load your pages that way.
Run php artisan preset vue to start your project using Vue.
To access a menu link without refresh the page, use <route-link to="..."></route-link>
https://router.vuejs.org/guide/#html

The module creator for Magento gives me a blank page when seeing the admin page for it

I am using Shell's module creator and when I load up the Brands.php block for the admin panel to CRUD my custom database for my module, I am given a blank page upon clicking Manage Items from the Brand menu. Have you any idea why? I checked the error logs and there's nothing there.
From the image it looks like the Grid_Container isn't getting loaded into your layout. Try enabling Template / Block hints and seeing if there is anything loaded. I'm guessing your layout is misconfigured/missing.

component backend menu with variable

How to create backend menu link with variable e.g. userID to own component?
I know that is possible to make xml file in view but how to insert variable there?
Thanks.
For your front ent component you will aslo add its backend component. Links in Joomla 1.5 are normally managed in the MySQL table called jos_components. Take a look at the fields in jos components called: link,menuid,parent,admin_menu_link, admin_menu_alt.

Resources