laravel problem with chatify doesn't display user name or last name - laravel

i'm trying to use chatify on my project in messager page it show always the name 'Chatify Messenger'
i want to display user name who im talking with how to do this
user table : https://ibb.co/CKTw1TZ chatify view : https://ibb.co/F7MJqNQ

Related

Output a resource table inside of a custom Laravel Nova Tool

What I'm trying to build:
A custom tool, where, I can have 4 buttons at the top of the page. Then, when a user clicks a button, it will load an index type table, similar to a Nova resource table.
For example: A user could click on the "Widgets" button and it would load a "Widgets" resource table below. Next, the user could click on the "Doodah" button and it would then, instead, load the "Doodah" table below. ... My main question is if there's a way to just harness what's already written in Nova and import it into my custom tool.
The simplest solution is to add a router-link with the resource details inside the navigation.blade.php like this
:to="{
name: 'index',
params: {
resourceName: 'your resource urlKey',
},
}"

View Composer for sidebar in Laravel

using a view composer for the first time in Laravel. i have a sidebar that is included in every step of a submission form process a user goes through. i want the sidebar to have link that apply to the proper submission (i.e. if this is submission number 5, the links in the sidebar should all go to the edit function for submission 5.
i have the following code in my web.php:
View::composer('layouts.planbuilder', function($view){
$plansubmissions = PlanSubmission::find(3);
$view->with('plansubmissions', $plansubmissions) ;
}) ;
i am able to access the $plansubmissions variable, but of course this only applies to submission 3, which i hard coded in. is it possible to get the logic from another controller? i can't just get the user id with Auth because a user can have many submissions
View Composers also have access to the variables that were passed to the view itself, so if you are passing the submission to your view from the controller like so
return view('submissions.show', compact('submission');
Then in your composer you can assign it to $plansubmissions
$plansubmissions = $view->getData()['submission'];

How to create a New Page on Prestashop 1.7 Child Theme

I want to create a new page on my prestashop. I dont want to use the CMS to create the page, I need essentially a totally new page.
I have tried duplicating current .tpl's and renaming them - but I can never navigate to them - what is the url to access the new template?
E.g. say my site is www.xyz.com the "my account" template, sits under template/customer/my-account.tpl this my account page is normally accessed at xyz.com/my-account
I want a new but similar page - so I duplicate this template, rename it to my-account-new and change something in it, why can you not access the new template by change the URL to end with my-account-new - I just get a 404.
What am I missing?
Thanks
:)
you can add a new front controller in a custom module :
ModuleName/controllers/front/ControllerName.php
Then your new controller is a class that should be defined like :
Module::getInstanceByName('<ModuleName>');
class <ModuleName><ControllerName>ModuleFrontController extends ModuleFrontController
Then you add the method
public function initContent(){
parent::initContent();
$this->setTemplate('<templateFolder>/<templateName>');
}
You can now navigate to the template by going to index.php?fc=module&module=ModuleName&controller=ControllerName
So in this example replace every ModuleName with the name of your custom module and ControllerName with the name of your controller (for example MyCustomModule and MyCustomController).
The template will be in the your theme folder for example you can add customAddress in themes/ThemeName/templates/customer/customAddress.tpl
in which case the call to setTemplate would become :
$this->setTemplate('customer/customAddress');
I hope this helps.

Grails: Get user object (user field) in gsp

I wanna show a field of the logged in user in the nav bar of my website. What is the best approach to get the user object in a gsp file? With
<sec:username/>
I just get the username.
My nav bar, defined in my layout, is shown on every gsp page I have. I don't wanna pass the user object from every controller action (springSecurityService.loadCurrentUser()) to every gsp file.
Any idea? Thanks
Take a look at the documentation for the plugin. You will see it provides a tag library for accessing this information (among other things).
From the documentation:
Displays the value of the specified UserDetails field
if logged in. For example, to show the username property:
<sec:loggedInUserInfo field="username"/>
To display something if the user is logged in you can do the following:
<sec:ifLoggedIn>
Welcome Back!
</sec:ifLoggedIn>

Changing magento order status and button action on admin

I want to change to button actions in the Magento admin orders section, and after looking at a lot of posts on here I can not find an answer that fulfills my question:
Question:
I want to be able to click the print invoice button on the order and have it automatically change to shipped status and when I add shipping to the order with a tracking number and click submit I would like that status to change to shipped.. and I was wondering how this could be done?
In summary:
status changed to shipped - when invoice is printed
status changed to complete - when order is shipped
I assume I would start in editing this section: app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php
To change the status of an order the instruction is :
$order->setState('your state', true);
Ex. :
$order->setState('complete', true);
To have what you want you should edit the controller called when printing the invoice or creating the shipment. It's :
/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php in the printAction() method just after the line :
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
For the printing of invoice and
/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php in the saveAction() method just after the line :
$shipment->register();
But editing Controller is the most simple but the worst solution. If you know well Magento and php you could do this through Model or through events.
Best Regards,

Resources