List of Other General Plugins

  1. GoogleAnalyticPlugin
  2. SEOPlugin
  3. AdsPlugin
  4. EmailPlugin
  5. GooglePlugin
  6. FacebookPlugin
  7. InstagramPlugin
  8. PagesPlugin
  9. BotPlugin
  10. ImageWaterMark
  11. LandingPagesPlugin
  12. PrivatePhotosPlugin
  13. VerotelPlugin
  14. PaymentwallPlugin
  15. GiftPlugin

GoogleAnalyticPlugin

Google Analytic Plugin helps to integrate web analytics service offered by Google that helps you to track and report website traffic. For more information, See Google Analytics.

Directory Structure

  • GoogleAnalyticPlugin
    • controllers
      • GoogleAnalyticController.php
    • views
      • settings.blade.php
    • GoogleAnalyticPlugin.php

Other Detiails

resource description
GoogleAnalyticPlugin.php It adds hook to scriptTags to render google analytic javascript code provided by Google Analytics Service in every view.
settings.blade.php This view shows Google Analytic Acoount Number admin settings page.
GoogleAnalyticController.php This controller makes admin able to set Google Analytic account number.

SEOPlugin

SEO is an acronym for "search engine optimization". Keyword is something that a user enters in search engine to find specific informations over web. Adding these keywords and descriptions in web pages help others search engines indexing web pages. So that a user can find a website faster and top of search results. This SEOPluigin helps to add custom keywords to your web pages from admin panel.

Directory Structure

  • SEOPlugin
    • controllers
      • SEOController.php
    • views
      • settings.blade.php
    • SEOPlugin.php

Other Details

resource description
SEOController.php This controller makes admin able to set meta keywods and descripton for his web pages.
SEOPlugin.php This file adds theme hook to metaTags to render admin added meta keywords, meta descriptions. It has one block search engine option if enabled then it blocks search engines from indexing your web pages.

AdsPlugin

Ads Plugin helps to manage your website advertisements. This Plugin enables you to add advertisements at 4 different positions on your webpages at the same time. It lets you to choose wheather to show ads or not to those users who have Superpower activated.

Directory Structure

  • AdsPlugin
    • controllers
      • AdsController.php
    • models
      • Ads.php
    • repositories
      • AdsRepository.php
    • views
      • settings.blade.php
    • AdsPlugin.php

AdsRepository

method return type description
getAllAds() Illuminate\Database\Eloquent\Collection Can be used to get all advertisements ordered by descending from App\Models\Ads model.
getAdById($id) App\Models\Ads Can be used to retrive a Advertise by id. $id referes to ads_plugin table.
getAdByName($name) App\Models\Ads Can be used to retrive single record froom ads_plugin table by passing name of advertise. $name is string.
getSetAds() stdClass Can be used to get all advertisements respective to their positoins. Return object will have only leftsidebar, rightsidebar, topbar, bottombar, show_add attributes.
setAds($arr) void Can be used to assign advertisements to repective positions. arr is an associative array contains position with ads id of ads_plugin table like ['topbar' => 3, 'bottombar' => 5].
createAd($name , $htmlcode) void Can be used to insert a row into ads_plugin table. $name is string (name of the add) and $htmlcode is html text of the add.

Ads Model

This Model is used to store advertisement detials and to make CRUD operation on ads_plugin table. Namespace of this model App\Models\Ads. The attributes are listed below.

attribute type description
id bigint(20), autoincrement This is primary key of this table.
name varchar(500) Holds the advertisement's name.
code text Holds html code of the advertisement.
created_at timestamp, nullable This field is set when row inserted.
updated_at timestamp, nullable This field is set when row gets updated.
deleted_at timestamp, nullable This field is set when row gets soft-deleted.

EmailPlugin

This Plugin can be used to send email easily with very few lines of code. Admin can be activate or deactivate this plugin. If deactivated then no email will be sent.

Directory Structure

  • EmailPlugin
    • controllers
      • EmailPluginController.php
    • models
      • EmailSettings.php
    • repositories
      • EmailPluginRepository.php
    • EmailPlugin.php
    • EmailPluginInstall.php

How To Send Email Example



/*

Controller : ExampleController.php
Method : sendTestMail()

*/
...
....
use App\Components\Plugin;
...
.....

public function sendTestMail() {
    
    $email_data = new \stdClass;

    $email_data->user = App\Models\User::find(111); // any user object whom want to send email

    //optional
    $email_data->user2 = App\Models\User::find(222); //if details of other user used in email content

    //optional for raw mail content
    $email->extra_symbols = ['@test' => 'test content']; //this will replace @test  keyword in
                                                          //email content

    //final step
    Plugin::fire('send_email',$email_data); //returns ["success" => "email sent"] or ["error" => error msg]
                                                                                    
}



Inbuilt Email Symbols

Below symbols can be used in raw email content to add specific details of user.

@email or @to_email -> This Keyword Will Be Replaced With user email.
@from_email -> This Keyword Will Be Replaced With other user email.
@website_name -> This Keyword Will Be Replaced With Website Name or Title
@website_link -> This Keyword Will Be Replaced With Website url
@name or @to_name-> This Keyword Will Be Replaced With User Name
@from_name -> This Keyword Will Be Replaced With User Name
@profile_link or @to_profile_link-> This Keyword Will Be Replaced With profile link of user
@from_profile_link -> This Keyword Will Be Replaced With profile link of other user
@forgot_password_link -> This Keyword Will Be Replaced With forgot password url
@activate_account_link -> This Keyword Will Be Replaced With account activation url

How to Set Email Content

Before sending email, email body and subject has to be set. To add a email content setting view in admin panel. You have to add few lime of code in plugin hooks. Example:



/*

Controller : ExamplePlugin.php
Method : hook()

*/
...
....
use App\Components\Plugin;
use App\Components\Theme;
...
.....

public function hook() {
    
    Theme::hook('admin_email_content', function(){
        return array(
            array(
                'heading'        => 'Example Email Heading ',
                'title'          => 'Example Email Title',
                'mailbodykey'    => 'Unique mail body name or id',
                'mailsubjectkey' => 'Unique mail subject name or id',
                'email_type'     => 'example_email', //unique email type
            ),

        );
    });
                                                                                    
}



EmailPluginRepository

method return type description
emailContentParser ($content, $user, $other_user, $extra_symbols = []) string This method is used to parse raw email content and replace the special symbols with specific value.
getSymlinks ($user, $other_user) array Used to get all inbuild symbols listed. Returns associative array of symbol and value pair.
getEmailSettings($type) App\Models\EmailSettings Used to get a specific email setting with email type from email_settings table.

EmailSettings Model

Located in App/Plugins/EmailPlugin/Models directory and namespace is App\Models. To use this model add use App\Models\EmailSettings; in your code. The attributes are listed below:

Attribute Type Description
subject text It contains the subject for the email to be sent.
content text It contains either the view name or the raw html that is to be sent in the email
content_type integer It contains either 1, if the email being sent is from a template i.e a view or 0 if the email being sent is raw html
email_type varchar It denotes the type of email that needs to be sent.

GooglePlugin

This Plugin can be used to login to the site using google and import contacts from google. Note : You need to specify the callback url 'website-link/google/callback' while creating the google app.

Directory Structure

  • GooglePlugin
    • controllers
      • GooglePluginController.php
    • repositories
      • GoogleRepository.php
    • views
      • settings.blade.php
    • GooglePlugin.php
    • GooglePluginInstall.php

GoogleRepository

method return type description
insertPhoto($logId,$image_id,$url) void Used to store user's photo details into photos tables. $logId refers to logged in user id, $image_id refers to source image id, $url is a string that refers to photo name stored in filesystem.

Other Details

resource description
settings.blade.php This is the admin blade file that is used in the admin view to set the google app id and secret key for the plugin.
GooglePluginController.php This controller contains functions for authentication and logging in using socialite driver. It also contains a function that is used for importing google contacts of a user after authentication.

FacebookPlugin

This Plugin can be used to login to the site using facebook and import photos from facebook.

Directory Structure

  • FacebookPlugin
    • controllers
      • FacebookPluginController.php
    • Repositories
      • FacebookRepository.php
    • views
      • settings.blade.php
      • fb_photos.blade.php
    • FacebookPlugin.php
    • FacebookPluginInstall.php

FacebookRepository

method return type description
deleteFacebookUsers ($user_ids) void Used to delete all entries of $user_ids from facebook_friends table on user deletion by admin.
saveFacebookFriends($user1, $user2) void Used to store the user id of all facebook friends using the same app, corresponding to the logged in user as $user1.
insertPhoto($logId,$image_id,$url) void Used to store user's photo details into photos tables. $logId refers to logged in user id, $image_id refers to source image id, $url is a string that refers to photo name stored in filesystem.

Other Details

resource description
settings.blade.php This is the admin blade file that is used in the admin view to set the facebook app id and secret key for the plugin.
fb_photos.blade.php This is a blade file that is hooked in profile_edit.blade.php to import facebook photos.
FacebookPlguinController.php This controller contains functions for authentication and logging in using socialite driver. It also contains a function that is used for importing facebook photos of a user after authentication.

InstagramPlugin

This Plugin can be used to import photos from instagram.

Directory Structure

  • InstagramPlugin
    • controllers
      • InstagramPluginController.php
    • Repositories
      • InstagramRepository.php
    • views
      • settings.blade.php
      • insta_photos.blade.php
    • InstagramPlugin.php
    • InstagramPluginInstall.php

InstagramRepository

method return type description
getInstaPhotoIds($user_id) void Used to get an array containing all the photo id's that are already imported for the current user.
insertPhoto($logId,$image_id,$photo_name) void Used to store user's photo details into photos tables. $logId refers to logged in user id, $image_id refers to source image id, $photo_name is a string that refers to photo name stored in filesystem.

Other Details

resource description
settings.blade.php This is the admin blade file that is used in the admin view to set the instagram app id and secret key for the plugin.
insta_photos.blade.php This is a blade file that is hooked in profile_edit.blade.php to import instagram photos.
InstagramPlguinController.php This controller contains function for logging in using socialite driver and importing instagram photos of a user after authentication.

PagesPlugin

This Plugin can be used to create a new page with known route and no side columns .

Directory Structure

  • PagesPlugin
    • controllers
      • PagesPluginController.php
    • Repositories
      • PagesRepository.php
    • views
      • settings.blade.php
      • page.blade.php
    • PagesPlugin.php
    • PagesPluginInstall.php

PagesRepository

method return type description
getPageByTitle($title) App\Models\Pages Used to return a pages mdoel object corresponding to $title.
getPageByRoute($route) App\Models\Pages Used to return a pages mdoel object corresponding to $route.
save_settings($arr) void Used to save the details of the new page to be created from the admin panel.
updatePage($arr) void Used to update the information of the page that is already created from the admin panel.
deletePage($arr) void Used to delete a page from the admin panel.
activatePage($arr) void Used to activate a deactivated page from the admin panel.
deactivatePage($arr) void Used to deactivate a page from the admin panel .

Other Details

resource description
settings.blade.php This is the admin blade file that is used in the admin view to set the attributes of the new page to be created or to edit the pages already created.
page.blade.php This is a blade file that is used to display contents of all the pages created through the plugin.
PagesController.php This controller contains functions that call each of the repository functions and issues an error if any.

BotPlugin

BotPlugin is used to create fake users when a normal user is registering and if no other users are not there within his/her 100 km radius. Admin can choose how many bot users and of what type gender are to be cloned.

Directory Structure

  • BotPlugin
    • controllers
      • BotController.php
    • models
      • Bot.php
      • BotFields.php
    • repositories
      • BotRepository.php
    • views
      • bot_create.blade.php
      • bot_users.blade.php
      • bot_bots.blade.php
    • BotPlugin.php
    • BotPluginInstall.php

BotRepository

method return type description
getAllBotUsers () Illuminate\Pagination\LengthAwarePaginator Used to get 100 bot users only form user table with descending order.
getCountMaleBots() integer Used to get number of total male bots.
getCountFemaleBots() integer Used to get number of total female bots.
getCountBots() integer Used to get number of total bots.
activateBotUsers($bot_ids) void Used to activate bot users from user table.
deactivateBotUsers($bot_ids) void Used to deactivate bot users from user table.
getTotalActiveBotsCount() integer Used to get number of total active bots.
getTotalBotUsersCount() integer Used to get number of bot users cloned.
getBots() Illuminate\Database\Eloquent\Collection Used to get all bot records ordered by descending.
getSettings() array Used to get bot create settings eg. number of bots to be created and bots creating gender filter. ['no_of_bots' => 3, 'bot_gender_filter' => 'same']
setSettings($no_of_bots, $gender_filter) void Used to set bot create settings eg. number of bots to be created and bots creating gender filter.
deleteBot ($botID) void Used to soft delete a bot by bot id. $botID refers to bots table.
deactivateBot ($botID) void used to deactivate a bot by bot id. $botID refers to bots table.
activateBot ($botID) void Used to activate a bot by bot id. $botID refers to bots table.
createBot($data) void Used to create bot. $data is an associative array key:value pair respective to bots tables column
modifyBotCreationData ($data, $profile_pic_name) array Used to modify bot create post request data before creaiting and saving new bot. $data is array generated by $request->all(). It removes _token, password_confimation fields from request data and modifies request data directly and returns back.
validate ($request) Used to create bot create post request data. $request is instance of Illuminate\Http\Request class.
saveProfilePicture ($file) string Used to save bot profile picture. $file is raw binary post request image data.
createBotUsers ($user) void Used to create bot users based on admin settings Eg: no_of_bots (no of bots to be created) and bot_gender_filter (what type of bot male or female).
cloneBots ($user, $gender_filter, $count) Used to clone bots based on $gender_filter. $gender_filter is string(values can be only both, opposite, same)
cloneMaleBots ($user, $count) void Used to create only male bots of $count numbers. $count is integer refers to number of bots to be created.
cloneFemaleBots ($user, $count) Used to create only female bots of $count numbers. $count is integer refers to number of bots to be created.
cloneBothBots ($user, $count) void Used to create both male and female bots of $count numbers. $count is integer refers to number of bots to be created.
doClone ($user, $bot) void Used to clone a bot to a user. $user is App\Models\User instance from which latitude, longitude, city, country are taken. $bot is instance of App\Models\Bot, from which a user is cloned.
countNearByUsers($lat, $lng, $distance, $unit) integer Can be used to get number of nearby users based on latitude and longitude within a specified radius. $lat is float refers to latidude, $lng is float refers to longitude, $distance is integer, $unit is string refers km or mile

Bot Model

This model is used to store bot details. Namespace of this model App\Models\Bot. The attributes are listed below.

attribute type description
id bigint(20), auto-increment Primary key
name varchar(100) Holds name of a bot.
password varchar(100) Holds hashed password string.
gender varchar(1) Holds gender of bot("M", "F")
status varchar(100) Holds status of bot.
isactive varchar(100) Holds 'true' or 'false'
hereto varchar(100) Holds purpose, will be copied when bot is being cloning.
profile_pic varchar(200) Holds profie picture file name.
dob date Holds date of birth.
joining date Holds date of joining.
created_at timestamp This field is set when row inserted.
updated_at timestamp This field is set when row gets updated.
deleted_at timestamp, nullable This field is set when row gets soft-deleted.

All the relationship methods are listed below:

method return type description
age() date Can be used to get date of birh of a bot.
joining() date Can be used to get date of joining.
profile_pic_url() string Can be used to get profile picture url of a bot.
thumbnail_pic_url() string Can be used to get thumbnail picture url of a bot.
status() string Can be used to get active status (active, inactive).
gender() string Can be used to get gender of a bot (male, female).

BotFields Model

attribute type description
id bigint(20), auto-increment Primary key
bot_id bigint(20) Foreign key of bots table id column.
value text holds custom profile fields value.
field_id bigint(20) Foreign key of fields table id column.
created_at timestamp, nullable This field is set when row inserted.
updated_at timestamp, nullable This field is set when row gets updated.
deleted_at timestamp, nullable This field is set when row gets soft-deleted.

ImageWaterMark Plugin

ImageWaterMark Plugin is used to add watermark on uploaded photos. Admin can choose watermark image and the position where water mark to be applied. Watermark is not applied on thumbnail images.

Directory Structure

  • ImageWaterMark
    • controllers
      • ImageWatermarkController.php
    • repositories
      • ImageWatermarkRepository.php
    • views
      • settings.blade.php
    • language
      • en
        • ImageWaterMark.php
      • bg
        • ImageWaterMark.php
      • de
        • ImageWaterMark.php
      • ar
        • ImageWaterMark.php
      • es
        • ImageWaterMark.php
      • fr
        • ImageWaterMark.php
      • he
        • ImageWaterMark.php
      • hu
        • ImageWaterMark.php
    • ImageWaterMark.php

ImageWaterMarkRepository

method return type description
addWaterMark($image_name) void used to add water mark to a image. $image_name is string (image name on which water mark is to be applied).
getWaterMark() string Used to get absolute path of watermark image.
getImage($image_path) Intervention\Image\ImageManagerStatic Used to get binary image data from image path. $iamge_path is string (path from where image is taken)
getEncounterImagePath ($image_name) string Used to get encounter size image path on which watermark will be applied. $image_name is string(name of the image file watermark to be applied).
getOriginalImagePath ($image_name) string Used to get original size image path on which watermark will be applied. $image_name is string(name of the image file watermark to be applied).
isWatermarkExists() boolean Used to check wheather water mark image exists or not.
saveWatermark($watermark_image) void Used to upload water mark to /public/uploads/watermark directory. $watermark_image is raw binary image data
saveWatermarkMode($mode) void Used to save water mark mode activated or deactivated. $mode is string can be only 'true' or 'false'
saveWatermarkPosition($position) void Used to set watermark position. $position is string and can only be top-left, top, top-right, left, right, center, bottom, bottom-left, bottom-right
getMode() string Used to get water mark mode wheather it is actiavted or not. Returns 'true' or 'false'
getPosition() string Used to get positon of water mark to be applied. This can be only top-left, top, top-right, left, right, center, bottom, bottom-left, bottom-right

LandingPagesPlugin

Landing Pages Plugin is a very handy, using this admin can choose different landing page for his/her website.

Directory Structure

  • LandingPagesPlugin
    • controllers
      • LandingPagesController.php
    • repositories
      • LandingPageRepository.php
    • views
      • admin_landing_pages_setting.blade.php
      • landing_pages
        • Sample_Landing_Pages
          • registration.blad.e.php
          • signiin.blade.php
    • assets
      • Sample_Landing_pages
        • js
        • css
        • screenshots
          • registration.jpg
          • signin.jpg
    • LandingPagesPlugin.php

LandingPageRepository

method return type description
getLandingPages() array Used to get all the landing page stored in landing_pages directory.

*note : All landing pages must be a uniqe name. Inside that directory registration.blade.php & signin.blade.php must be there. All the assets used by a landing page must be inside LandingPagesPugin/assets/{landing page name} directory and must contain one screenshots directory with resgistration.jpg and signin.jpg.

PrivatePhotosPlugin

This Plugin can be used to make public photos private or add private photos from the system. In order to view the private photos of say user2, user1 needs to be matched with user2 or send a private photos request to user2, on acceptance of which user1 can view the photos.

Directory Structure

  • PrivatePhotosPlugin
    • Controllers
      • PrivatePhotosController.php
    • Repositories
      • PrivatePhotosRepository.php
    • Models
      • PrivatePhotos.php
      • PrivatePhotosAccess.php
    • views
      • private_photos.blade.php
      • settings.blade.php
      • slider.blade.php
      • slider_visited.blade.php
    • PrivatePhotosPlugin.php

PrivatePhotosRepository

method return type description
photo($id, $file) string Used to store multiple photos uploaded by the user from the system.
isRequestSent($logId, $id) boolean This function returns true or false accordingly if $logId has sent a request to $id or not.
isVisible($logId, $id) boolean This function returns true or false accordingly if $logId can view the private photos of $id or not.
getAllPvtPhotos($id) App\Models\PrivatePhotos Used to get a model object containing all the private photos of $id.
send_pvt_photos_request($user1,$user2) void Used to send a private photos access request by $user1 to $user2.
accept_pvt_photos_request($user1,$user2,$status) void Used to accept the private photos request that was sent by $user2
public_to_private($id, $arr) void Used to change $id's public photo to private.
private_to_public($id, $arr) void Used to change $id's private photo to public.
getPendingRequests($id) App\Models\PrivatePhotosAccess Used to get all the pending private photos request of $id along with the count.
getUsersWithAccess($id) App\Models\PrivatePhotosAccess Used to get all the accepted private photos request of $id along with the count.
insertUserPvtPhotosAccess($user1,$user2,$status) void This function is used to create an entry in user_pvt_photos_access table.

PrivatePhotos Model

This Model is used to store private photo detials. Namespace of this model App\Models\PrivatePhotos. The attributes are listed below.

attribute type description
userid int Holds the user id of the photo.
source_photo_id varchar Holds source photo id of the photo.
photo_source varchar Holds the source from where the photo was uploaded.
photo_name varchar Holds the random photo name as generated while uploading.

PrivatePhotosAccess Model

This Model is used to store private photos access detials. Namespace of this model App\Models\PrivatePhotosAccess. The attributes are listed below.

attribute type description
user1 int Holds the user id of the person who sent the request.
user2 varchar Holds the user id of the person to whom the request was sent.
status varchar Holds the status of the request namely 'pending', 'yes' or 'no'.

VerotelPlugin

Directory Structure

  • VerotelPlugin
    • Controllers
      • VerotelController.php
    • Repositories
      • VerotelRepository.php
    • views
      • settings.blade.php
      • tab.blade.php
      • tab_content.blade.php
    • VerotelPlugin.php

VerotelRepository

method return type description
get_purchase_URL($signatureKey, $params) link This method returns the purchase url for verotel using the $signatureKey and $params.
generate_URL($baseURL, $signatureKey, $params) link This method generates the purchase url and returns the link to get_purchase_URL function.
get_signature($signatureKey, $params) string This method is used to fetch the signature key for verotel.
filter_params($params) array This method is used to filter the parameters that are required to generate the sha1 signature hash for verification.
signature($signatureKey, $params) string This method returns the sha1 verotel signature for verification using the signature key.
build_URL($baseURL, $params) link This method builds the purchase url by using $baseURL and $params passed from generate_URL function.

Other Details

resource description
settings.blade.php This blade file contains the admin view for setting the verotel settings.
tab.blade.php This view file contains the tab that is hooked in the pop-up modal for payment.
tab_content.blade.php This view file contains the tab content that is hooked in the pop-up modal for payment.
VerotelController.php This controller contains functions for displaying admin verotel settings and saving the settings. It contains a function that is used for charging the user and the callback returns the flow to PaymentGatewayController with the transaction details .

PaymentwallPlugin

Directory Structure

  • PaymentwallPlugin
    • Controllers
      • PaymentwallController.php
    • views
      • settings.blade.php
      • tab.blade.php
      • tab_content.blade.php
    • PaymentwallPlugin.php

Other Details

resource description
settings.blade.php This blade file contains the admin view for setting the paymentwall settings.
tab.blade.php This view file contains the tab that is hooked in the pop-up modal for payment.
tab_content.blade.php This view file contains the tab content that is hooked in the pop-up modal for payment.
PaymentwallController.php This controller contains functions for displaying admin paymentwall settings and saving the settings. It contains a function that is used for charging the user and returns the transaction details for the payment.

GiftPlugin

Gift Plugin enables you to send gifts to user's on visiting their profile's. You can also send gifts while chatting to a user.

Directory Structure

  • GiftPlugin
    • Controllers
      • GiftPluginAdminController.php
      • GiftPluginController.php
    • models
      • Gift.php
      • UserGift.php
    • Repositories
      • GiftAdminRepository.php
      • GiftRepository.php
    • views
      • admin_settings.blade.php
      • profile_gift.blade.php
      • send_gift.blade.php
      • user_gift.blade.php
    • GiftPlugin.php
    • GiftPluginInstall.php

GiftAdminRepository

method return type description
createGift($data) void Can be used to create a gift by the admin from admin panel. The admin can select an image, price and for whom the gift would be available.
saveImage($file) string Can be used to save the gift image. It returns the image filename.
createGiftImageDirectory() void Can be used to create a gift directory in public/uploads/ , if directory is not present .
isGiftExists($gift_name) boolean Can be used to check if gift exists or not. It returns true if exists or else false
getAllGifts() App\Models\Gift This method returns all the gifts as created by the admin.
delete_gift($arr) void This method is used to delete a gift. $arr contains the id of the gift to be deleted
edit_gift($arr) void This method is used to edit a existing gift by the admin. $arr contains value of all attributes to be modified.

GiftRepository

method return type description
sendGift($id, $arr) boolean Can be used to send a gift to another user. $arr contains all the information for sending a gift.
getAllUserGifts($id) App\Models\UserGift Can be used to get all gifts sent to userid $id.
hide_gift($id,$arr) void The user can hide its received gift from profile-edit view..

Gift Model

This Model is used to store the gift detials. Namespace of this model App\Models\Gift. The attributes are listed below.

attribute type description
name varchar(255) Holds the gift's name.
icon_name varchar(255) Holds the icon name of the gift as stored in the system.
price int Holds the amount of credits to be deducted to use this gift.
for enum(male,female,all) Holds the gender for which the gifts would be available.

UserGift Model

This Model is used to store which gifts are sent to whom along with the message.

attribute type description
from_user bigint(20) Holds the id of the user sending the gift.
to_user bigint(20) Holds the id of the user receiving the gift.
visible enum(yes,no) Holds if the gift is visible on user's profile or not.
gift_id bigint(20) Holds the id of the gift sent by the loggedin user.
msg varchar(500) Holds the message to be displayed along with the gift in receiving user's profile.