how to add or edit gravitar within laravel - laravel

I know that we can user the gravitar in laravel for display pic but how can we add one if the new user doesn't have it or wish to update the current one from within the application?
below article shows how to show existing gravitar in laravel.
How do I implement Gravatar in Laravel?

You can supply a default image through the Gravatar URL.
Documentation.

Related

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

Laravel Nova - output forms on front end?

I am building a system that uses Laravel Nova for managing resources.
There are a couple of instances where I want non-admin users to be able to create resources. The ideal solution would be to define the resource in Nova and embed Nova's own create form on the front end of the site.
Has anyone done anything similar, or have any suggestions how to go about this?
I believe you can use the same endpoints that Nova is using.
For example to get all the fields of a resource:
GET updating fields:
http://{url}/nova-api/{resource}/{id}/?editing=true&editMode=update
GET creation fields:
http://{resource}/nova-api/{resource}/creation-fields?editing=true&editMode=create=
After the user has filled out the fields, you can use this endpoint to save the new values:
PUT:
http://{url}/nova-api/{resource}/{id}

laravel-voyager custom views for role

Laravel Version: 5.26.27
Voyager Version: 1.1.3
PHP Version: 7.2.1
Database Driver & Version: MySQL 5.6.38
Description:
I'm new to Voyager but have already managed to create tables, populate them and configure their access privileges for BREAD.
But I need one option to see in the posts the custom roles can view just himself post, I see one option
#foreach($dataTypeContent->where('author_id','=', Auth::user()->id) as $data)
But this code modifies all views because is in the view. I need some more generic in the model
Is this possible with Voyager or it calls for custom code?
Thanks in advance!
Your question is a little confusing to read, but it sounds like you're asking if it's possible to override Voyager views or add custom views and the answer is, yes you can.
They have a video here: https://laravelvoyager.com/academy/views/
and written documentation here: https://voyager.readme.io/docs/overriding-views
The short of it is, create a directory resources/views/vendor/voyager/slug-name where slug-name is the slug for the corresponding table view you want to override. Put an edit-add.blade.php file in that folder along with a browse.blade.php file. I would just copy Voyagers default view logic into those files and then modify them to suit your needs.

How to add user custom fields to the edit profile form?

I had to add a series of custom fields to the joomla registration form. Thanks to the guide I managed to do it, both for the registration form and for the administrator form.
The process I followed for this are the following:
Added the fields to the users table
Added the fields in joomla user entity /library/src/user/user.php
Added the fields and definition to /components/com_users/model/forms/registration.xml file to update the registration form
Added the fields and definition to administrator/components/com_users/model/forms/user.xml file to update the user edition form for user with administrator role
Now I require the user to be able to change their profile data with the inthe fields that were created manually. To do this I added a link to the menu
form to edit profile, here I expected to see all user fields, both native and custom created, but instead I obtain only the native fields, although upon inspecting the object (user) I can access all the user fields.
I created the fields by hand and then I expected that when they were saved they would persist, but it is not, when sending the form only the native data is updated and not the custom fields.
When I inspect, I see that a component named k2 is the one that facilitates this profile editing form, I am new to joomla and its ecosystem
Could you please give me guidance on how to implement this task?
Greetings and thanks in advance
Do not edit core components.
There is a way to do the same using Profile plugin.
https://docs.joomla.org/Creating_a_profile_plugin
Go through above link and create a new profile plugin.
This is not the way to add extra user fields. What will you do if you need to update Joomla. Joomla releases security updates at regular intervals. First you need to create a user plugin and then you add whatever user fields you need. I found a detailed description here, you also can have a look. if still you get any doubts you can ask me here in comments.
https://smartyblog.com/adding-custom-fields-to-joomla-registration-using-profile-plugin/

Modify component output using module......Joomla 3.0

I am a new developer in joomla.
I just want to integrate joomla component to custom module.When a user install module then output of related component must be change as per module file automatically .
I want to use filters with Jreviews_geomap_addon.So create a module to use filter icons into geomap...
Thanks
The module should have a form or link that submits or changes the URL when clicking on the links. You can then read the url parameters using:
$var_name = JFactory::getApplication()->input->get('var_name');
You can then use the $var_name to change what data is displayed by your component.

Resources