Author: aynsoft123

  • What is CRM software?

    CRM stands for Customer Relationship Management. It is the strategy for managing a company’s relationship and interactions with its customers and prospective customers.

    Goal

    The goal of CRM software is improving the customer service or assisting customer retention, using analytics and increasing sales.

    Benefits

    • CRM often involves using technology to organize, automate and synchronize service, sales and marketing functions of the company.
    • Resolve customer complaints, track leads, close opportunities, and automate sales process and present complete view of your customers’ life cycle.
    • CRM software consolidates customer information into a single database, so companies can more easily access and manage sales and marketing.

    Features

    CRM software provides following features:

    CRM Dashboard

    In this dashboard, you can view entire sales funnel, reports, lead status, customers, sales, users, map etc on a interactive graphical dashboard on monthly/yearly basis.

    Contact Management

    This management helps you to maintain your contacts, leads, accounts, customers, phone numbers, emails etc in a centralized place.

    Web to Lead

    This feature is used to directly collect and capture the lead from your websites- contact us page and add into CRM Software in leads management’s module.

    Database Management

    This is used to manage your contact, leads, accounts, customers, phone numbers, emails etc in a centralized place.

    Accounts Management

    This features provides you to View and manage your accounts such as company information, contacts, phone numbers, emails etc in a centralized place and view sales information.

    Leads Management

    This is used to capture leads from various sources like website, web to lead form, CSV, mobile, contacts, email and easily categorize them as per lead status.

    Deals Management

    In this you can view sales pipeline and online status of leads in their respective stage like customer lost, customer won, leads, negotiation, proposal, prospects in a drag and drop format.

    Customers Managements

    In this, this management provide you to view and manage your customer’s database such as contacts, phone numbers, emails etc.

    Sales Management

    This feature provide View Company sales- monthly, quarterly or yearly basis, view sales target vs achievement. It helps in sales automation, sales force management and analysis.

    Forecast Management

    This feature provides View details of sales vs forecast, percentage quota achieved, top achievers, amount in pipeline etc. It helps the organization to achieve the sales targets efficiently.

    Reports and Analytics

    In this you can View customers, deals, leads, sales, pipeline, forecast, sales by users, map on a- day/week/month, reports online. It helps in business process management, i.e. to discover, analyze, improve and automate sales process.

    Notifications

    This features get alerts when web to lead form is filled, appointment, lead generated or any other activity, also receive email alerts based various CRM module activation like form submission, daily report etc.

    Newsletter

    Launch an email marketing campaign and send email newsletters to customers, accounts, leads etc and track the mail response.

    Mail

    This is an internal messaging system to send emails to customers, accounts, and leads etc via CRM Software.

    Document Management

    In this you can upload, track, manage and store documents. In this product literature, presentations and other sales and marketing documents can be stored online and shared with prospects.

    Product Management

    In this you can add products and view the sales related data of the product at all stages of the sales cycle.

    Invoice Management

    In this features, you can create and send invoices, add product information, pricing, discount, delivery charges etc. Also save invoice as PDF file, send invoice by email to prospects and view Reports.

    User Management

    This features enables admin or sales manager to control user access and on board and disable users from using the CRM Software. It can also be used as sales management module to manage sales staff.

    Admin Control Panel

    CRM provides this functionality where dashboard of all company related settings like add/edit/delete users, view analytics, add API settings, send newsletter, view reports, change logo, CSS and do any other administrative function.

    File Manager

    CRM provides File Manager functionality such as it provides a user interface to manage files. Admin can upload files such as product literature, brochure, documents, PDF etc, and these files can be viewed by users and used for sales and marketing purpose.

    Calendar

    CRM software provides setup appointment using Online Calendar and use it as a scheduling application that lets sales staff to keep track of events, appointments, meetings etc.

    Facebook CRM

    CRM software provides complete integration with Facebook Ads. It is easy to setup and automates the lead generation process.

    FinCRM.com is the best CRM Software which has all the above features
    Pl. check – www.fincrm.com

  • What is job board software

    Job Board software is a web-based application that enables you to quickly deploy functional advanced job board.
    It provides end-to-end solutions for the recruitment industry. It can be used in setting up Job sites for regional Job site, general Job site and for specific countries. It has the most advanced features like advance job search, job alert, Applicant Tracking, a premium membership that results in better response for job seeker.

    Benefits of Job Board:

    Job board provides benefits to all three stakeholders, i.e. Job seekers, employers and administration

    1. Job Seekers:

    When candidates are actively searching for their next job and they want to be able to set the ideal criteria, Then, Job Board Software offers a system with advanced functionality to enables candidate’s to set specific filters like job searches with keywords, by location, by job categories, by company, experience, by recently posted jobs or by Zip code.

    2.Employers:

    Ejobsitessoftware offers end-to-end solution to recruitment business or employers which can reduce the administrative burden streamline processes and speed up their capability to deliver with accuracy and speed. Functionality provided by Ejobsitessoftware as follows:

    • Manage the registration and accounts for all colleagues involved in recruiting.
    • It allows companies to set up their own profiles and add their company logo.
    • Functionality, a system that manages job postings and adverts, gives access to resume databases.
    • It provides applicant tracking system that automates the online job application and resume tracking process.
    • It provides the ability to set up autoresponder emails.

    3. Admin:

    In admin site, Job Board Software is easy to use, completely automated and requires no technical skills to administer. It has the flexibility to change the look and feel of the home page and the site through its theme management system and its fully customizable CSS-based design and layout.

    Advantages:

    • It enables career site companies to successfully achieve their objectives.
    • It is customizable to meet the specific need of particular industry or location and provides all the tools required to easily manage a profitable job board business.
    • In a short duration it has become the preferred choice for organizations, employers, recruiters, internet entrepreneurs, webmasters and consultants who wanted to add value to existing applications or create benchmark Job Board.

    Features of Job Board:

    Job Board Software has included many features, some features are as:

    1. Job Seeker: Job board has included the most advanced features like advance job search, job alert and following things that result in better response for job seeker.

    Search Jobs: job seeker can search jobs by location, category and company, and this provides the advanced job search with keywords, experience.
    Job Seeker Profile: This feature provides quick registration using email and password, new account notification, retrieve password by automated email, update profile at any time etc…
    Job Seeker Control Panel: Job seeker can view list of applications- jobs applied for, save Jobs- add jobs to inbox for later viewing, get automated job application response and add, edit, delete job search agent etc…
    Resume Management: In this, resume builder using a step-by-step resume building wizard, submit resume to any employer with one click, add multiple Resumes and add video Resume via YouTube link etc…
    Job Management: In this job seeker can view job detail, view job response, apply job, share job, email job to a friend, view the profile of any company and view all jobs by a specific company.
    Premium Job Seeker: In this feature job seeker resume will be prominently featured in search resume.
    Newsletter: Job seeker can subscribe or unsubscribe to opt-in mail list.


    2. Employer: Job Board Software has the most advanced features like advance resume search, resume alert, Applicant tracking system, premium membership, contact management that result in better hiring for companies and has included following features for employer such as:

    Search Resumes: This feature provide following things as:
    Search resumes Search resumes by job category, rating, name, email experience, keywords and also search resume by location.
    Search Applicants: This feature is used to search applicant by first name, last name and using email id.
    Employer Report: In this employer can view job status, view total jobs posted, active jobs, expired jobs and view total applicants and selected applicants.
    Employer Profile: This feature provides quick employer registration using email and password, buy job postings or resume database access, Retrieve passwords by automated email and update profile at any time.
    Manage Users: Employer can setup multiple accounts for colleagues within company and create and manage sub-accounts.
    Applicant Tracking: Using this employer can view applicants, track, qualify, rate and view the hiring status of candidates, send interview request and select candidate.
    Recruiter Control Panel: It provides graphical display of job status and applicant pipeline and also add contact list or database of people and companies.
    Job Management: In this employers can post, edit, delete, import multiple jobs, activate or deactivate jobs, and view list of active jobs, expired jobs, deleted jobs etc…


    3. Admin: In this feature, admin has full control over global site configurations. This feature has include following things some feature are as:

    Dashboard: This provide the view reports of total jobseeker, featured jobseeker, recruiters, active recruiters, featured recruiters, jobs, active jobs, expired jobs, deleted jobs, featured jobs, sales etc. And view the yearly report, monthly report and latest orders. In this admin has full control over global site configuration.
    Recruiters: In this admin can view list of recruiters, add/edit/delete recruiters, quick disable recruiter status to inactive and sort recruiters by name, email id and company, and view recruiter details like jobs posted, control panel, list of orders.
    Job Seekers: Admin can view list of jobseekers, view list of paid jobseekers, add/edit/delete jobseekers, sort Recruiters by name, email id, quick disable jobseeker status to inactive and view jobseeker details from control panel.
    Themes: Job Board Software provide the theme management system for add/edit/delete themes and change the look of the site. In Job Board Software, eighteen themes are built-in the software with fully customizable CSS based design and layout.
    Mobile: Job Board Software provide Mobile/Responsive view of job board and provide six mobile themes are built in software. Admin can change theme, edit logo, edit mobile theme CSS or text. The mobile theme is built for Android and iPhone app.
    Setting: There are following settings included for admin such as:
    Location Management: add, edit, and delete – continent, country, zone and zip code.
    Job Type: add, edit, delete job type like full time, part time, freelance etc.
    Job Category: add, edit, delete job category.
    Job Seeker Language: add, edit, and delete language like English, French, and German etc.
    Career Level: add, edit, and delete career level.
    Social:LinkedIn, Google and Facebook Plugin: For login using LinkedIn username and password.
    Google Captcha: add Google captcha to avoid spam.
    Tools: In this following features are included such as:
    Database Backup: Automatic backup of database in- .sql, .zip format.
    Restore database Restore site backup.
    Take site backup Take site backup.
    Page Manager: edit text of pages like about us, advertise, FAQ, privacy statement, service, terms & conditions.
    Block IP:Block IP address of spammer etc…
    Import Jobs: In admin can Backfill/Import jobs from indeed.com into Job Board database. And can import jobs by campaign name, publisher id, recruiter id, location, country, job type, channel, active inactive, keyword like banking, construction etc.
    Configuration: In this admin can edit site configuration like default site title, left box width, right box width, site owner, admin email, jobsite address, char set, job duration, change minimum values and maximum values in fields, change default image width and height and edit, enable, disable various modules in job board like Twitter, Facebook, Banner manager setting, default language etc…

    Job Board Software is the best Job Board Software with all the above features
    Pl. check www.ejobsitesoftware.com for more details

  • What is WordPress Theme?

    WordPress Theme:

    In WordPress, a theme changes the design of your website and including its layout, meaning that, a theme is a collection of templates and style sheets used to define the appearance and display the WordPress websites. Changing your theme in WordPress define the changes how your site looks on the front-end. There are thousands of free and paid WordPress themes in the WordPress.org Theme Directory.
    In WordPress, Themes can be changed, managed and added from the WordPress dashboard area under Appearance/Themes:

    Each theme comes with different features, layouts, and design. A user can choose different themes according to their requirements for their website.

    What can Themes do?

    Basically, WordPress themes are more than color and layouts, which improve your website content and as well as make websites beautiful. Themes take the data and content stored by WordPress and display it in the browser. In WordPress, Themes can do many things as follows:

    • Theme can display content anywhere you want it to be displayed.
    • Theme can have different layouts, such static or responsive, using one column or two.
    • Theme can customize its typography and design elements using CSS.
    • Theme can specify which devices or actions make you content visible.

    In WordPress theme, you can modify the theme by adding plugins (plugin is used to control the behaviour and features of your WordPress site) or by adding code to the function.php file.

    Themes Made of?

    WordPress themes are made of distinct files that work together to create what you see, as well as how your site behaves. Under the theme directory, WordPress theme consists of two main required files, as well as additional files.

    Main Required files:

    • index.php: main template file.
    • style.css: main style file.

    Additional files:

    • PHP file: including template files
    • CSS files
    • Graphics
    • JavaScript
    • Text files: usually licence info, readme.txt instruction, and a changelog file.

    Default Theme (twentyseventeen): The default theme is used to showcase the features of WordPress and as well as used to create basic website. WordPress comes with a default theme to display the front-end of the website. Files included under the theme as follows:

    Note: Download WordPress themes locally in the https://wordpress.org/themes/ directory.

  • What is WordPress?

    Overview of WordPress:

    Word Press is a free, open source and content management system (CMS) based on the Php and MySql. According to a survey, it is most widely used content management system in the world, and it powers more than 30% of the top 10 million websites and has an estimated 60% market share of all websites built using a CMS.

    WordPress started as a simple blogging system in 2003, but after it has massive number of users, it has evolved into a full CMS with thousands of widgets, themes and plugins. WordPress allows you to customize and edit its code, create any type of websites using themes and plugins or any other tools.

    What is CMS?

    CMS stands for content management system. With this you are able to create, modify and publish digital content. It also supports multiple users, allowing you to work in collaboration. So, WordPress allows a CMS, with this you can create and define several administrative users and each one having different privileges.

    WordPress.com Vs WordPress.org

    WordPress.com and WordPress.org are two ways of hosting a WordPress sites.
    • In wordpress.com, if users are not interested in having a web server or own hosting, then wordpress.com may be way to go. WordPress.com quickly setup the sites and provides you a many features and customization but it comes with a price. And in this you cannot edit and modify the PHP code behind your site.
    • In wordpress.org, this allows you to edit and modify your PHP codes behind your site and you may download the script free of charge and host it yourself on a local machine. You don’t have to manage a web server or pay for hosting or download software. In this, you can add plugins locally or you can modify the codes accordingly to you.

    Features of WordPress:

    WordPress provides multiple features; some of the features are as follows:
    • WordPress provides advances user management system and settings
    • Easy to use
    • Password protection
    • Previewing Posts
    • Save Drafts
    • Drag and Drop Administration
    • Dynamic page generation
    • Easily Access to thousands of plugins
    • Easily use the third-party integrations

    How to Download WordPress in Localhost:

    In this article, I will show you, how to download and set up WordPress in a local machine with the following steps:

    Step1: Download the PHP server:

    You can download the XAMPP or WAMP server for your project. In this article, I have downloaded the WAMP server. You can download WAMP from this link: http://www.wampserver.com.

    Next, Install Wamp server:

    Step2: Download WordPress:

    Go to browser and navigate the wordpress.org and download the WordPress: https://wordpress.org/download/. Next, after downloaded the wordpress, go to your directory where wordpress is downloaded and copy the folder and copy/move it under the C:\wamp64\www\ directory.

    Step3: Connect WordPress with local server:

    After installation of WAMP and WordPress, start the wamp server and enter the URL localhost/phpmyadmin/ like this

    Next, open phpmyadmin and create database like this:

    Step4: Set-up WordPress:

    After database creation, navigate the browser localhost/wordpress, it will open a page and follow the given instruction like this:

    Next, Enter some details of your database name, your database user_name and password like this:

    After submit the page, then it will ask for Run and installation the wordpress like this:

    After installation welcome page will be open and it will ask for some information such as your website title, admin username and password. Fill the information like this:

    After submit the information, you will get success message and click on Login button:

    Login into the page:

    After login, you will get your Dashboard and web page like this:

    Dashboard:
    Webpage:
  • What is GitHub?

    Before discussing GitHub, first, we have to understand concept of Version Control System and Git. Then we will discuss GitHub.

    1. Version Control System:

    Version Control System is a component of software configuration management. Also we can say it is a “revision control” or “source control”. Basically we say that it is a software tool which helps to the software team to manage changes to source code over time. And it is managements of changes documents, software programs, web sites and other collection of information. It records changes and restore the erased or modified data or code.

    Benefits of VCS:

    • This keeps tracks of changes in codes.
    • Collaboration between developers.
    • It provide merge and revert functionality for changes in files.
    • It keeps track of all data “Who Did What” in files.
    • Easily to recover data if something is messed up.

    Some famous Version Control Systems (VCS):

    • Git
    • Apache Subversion
    • Mercurial
    • ClearCase
    • Perforce
    • Concurrent Version System

    2. Git:

    Git is an open source “Distributed Version Control System”. This is designed to handle everything from very large to small projects with speed and efficiency. In Distributed VCS, we can do local commits in our local machine and then we will push to server (remote machine).
    Git started by Linux since 2005 and it was initially made as CLI (command line interface).
    Git provide some essential features such as:

    Repository:

    It is the directory or you can called as repo, where we store our data, files , source code and you can store other type of file related to your projects.

    Branch:

    Braches is used to segregate the code or different type of versions of a repository at the same time. But if we talk about GitHub then “master” branch is used by default.

    Commits:

    In other words, we can understand this as a “save”, means that if we have completed the changes then we go for the commits.

    Push:

    Push is used to send the projects or files to a remote server from your local machine, means that if we have modified or changed the file from the local machine and want to send the remote site then we will call the push request.

    Pull:

    This request is just opposite the push request, if we change code from server site and wants to store in the local machine then we will go for the pull request.

    Merge:

    This request is used to merge the code of two branches in your GitHub Repository.

    GitHub:

    GitHub is implementation of Git, started by Linux creator Linus Torvalds. While Git is a command line tool, GitHub provides a web-based and cloud-based service that helps the developers and new programmers to store and manage their code, as well as tracks and control changes to their code.

    GitHub is a Git repository hosting service; it offers plan for free, enterprise and professional accounts. Free accounts are commonly used to host open source projects. It provides the web based GUI and also provides access control and collaboration features.
    Features provided by GitHub:

    • Wikis
    • Restrict editing to collaborators only
    • Issues
    • Sponsorships
    • Projects

    Advantages:

    Advantages of GitHub for Developers are as follows:

    1. Repository:

    GitHub provides developers to make a repository for store files (HTML, CSS, JavaScript, Documents, Data, and Images), source code, projects and what you want to store. In GitHub repository, also include a licence file and a “README” file about projects. Repository is like a directory, where data are stored like cloud based services.

    2. Fork:

    This request provides access control and collaboration to developers. In this request, User A copies a repository from another user B’s account. This enables users to take project that you don’t have write access to and modify it under your own accounts.

    3. Pull:

    If developers make changes in codes and wish like to share, this “pull” request is used to notify the original owner. The repository’s collaborators can accept or reject a request. Once the request is accepted or opened, you can discuss your work with the collaborators.

    4. Merge:

    This merge option provides developers to merge the original repository with the changed repository. In this merge, when merging pull requests, you can allow any combination of merge commits, squashing or rebasing.

    The code base to this tutorial is available in this GitHub repository:
    How to make an API: GitHub link – https://github.com/digitalcrm/LaraveAPI

    Corresponding GitHub link for article
    How to make an API: GitHub link:-> https://github.com/digitalcrm/LaraveAPI
    How to make Theme in Laravel: GitHub link:-> https://github.com/digitalcrm/ProjectTheme
    Laravel package: GitHub link:-> https://github.com/digitalcrm/test_package
    Make contact form in Laravel: GitHub link-> https://github.com/digitalcrm/Contact-Form/tree/master/Project
    How to create an Admin Panel in Larvel: GitHub link:-> https://github.com/digitalcrm/Admin-Dashboard

  • How to make API in Laravel

    In this article, we’ll discuss how to make an API in Laravel. Before building an API, you’ll need to have RESTful endpoints, authentication and JSON responses. So, Laravel offer all of this out of the box. So, in this article, we will go through the steps to make RESTful API in Laravel.
    Before going to the steps, we’ll get some overview about RESTful and Laravel Passport package.

    RESTful action:

    REST is stands for the Representational State Transfer which is an architectural style for network communication between applications and relies on the stateless protocol (Http). REST uses the methods such as GET, PUT, POST and DELETE.

    Laravel Passport:

    For API authentication we’ll use the Laravel Passport package. Laravel already makes it easy to perform authentication via traditional login forms, but in case of APIs, APIs uses the tokens to authenticate users and do not maintain session state between requests. Laravel makes API authentication a breeze using Laravel Passport, which provides the full OAuth2 server implementation for you Laravel application.

    How to make an API in Laravel?

    In this article we’ll make product reviews API. Users will add, update, delete the products and also view a list of products and review a product.
    Note: Code for this API is available on GitHub: https://github.com/digitalcrm/LaraveAPI.git
    Steps for make an API:

    1. Install Laravel app:

    Run the composer command: “composer create-project –prefer-dist laravel/laravel ProjectName”.

    2. Create Database:

    2.1. Connect Database with your Laravel project. Open database server and create new database
    2.2. Connect with your project, go to “.env” file and change the DB_CONNECTION, Database, User_name and password. In phpMyAdmin the default value of user_name is root and password is null(empty):

    3. Laravel Passport installation:

    3.1. Run the command “composer require laravel/passport”
    3.2. After this composer command, run the migrate command: “php artisan migrate”
    3.3. Now, Install the passport using “php artisan passport:install” command.
    Setup the passport installation:
    After running the installation command, add the “Laravel\Passport\HasApiTokens” to your “App\User model”.
    Next, you should call the “Passport::routes” method within the boot method of your AuthServiceProvider this file is located on “app/Provider/AuthServiceProvider” directory. And don’t forget to add the class of passport.
    Open your config/auth.php configuration file and set the driver option of the api authentication guard to “passport”. This will instruct your application to use Passport’s TokenGuard when authentication incoming API requests.
    How to Get Token in Passport:
    After completing the all steps, now open postman and add few line in Body area such as grant_type, client_id, client_secret, username and password:
    Client_secret will be obtaining from the database “oauth_clients” which is created by the passport automatically after install command.
    For getting username and password, run the auth command: “php artisan make:auth”.
    You will get the authentication in your project. Navigate “localhost:8000/user” in your browser. After this register the user as:
    Next, after all done send the request, you’ll get the token.
    After getting token, copy this token and make it on environment for easily accessing the data in API.

    4. Creating Model:

    4.1. Setup Migration Table:
    Next, create the model for Product and Review. For Product run the command:
    “php artisan make:model Model/Product –a”
    For Review model, run the command: “php artisan make:model Model/Review –a”
    Where “–a” will create the Controller, Model, Factories and Migration files for your application. After running this command, this will create files at your different directories.
    Under “app/” directory, Controller located at “app/Http/Controller” directory and Model located at “app/Model” directory.
    Migration and Factories will be located at under “database/”directory:
    Next after creating models, add some line of code for creating table in database: For Products, open “database/migrations/create_products_table.php” file and add some line of code:
    Open “database/migrations/create_reviews_table.php” file and add line of code for review table:
    Next Run the migrate command; this command will creates the table in database.
    4.2. Use Faker Table:
    Open “database/factories/ProductFactory.php” file and add line of code for creating fake Product table:
    Open “database/factories/ReviewFactory.php” file and add line of code for creating fake Review table:
    After factories, open “database/seeds/DatabaseSeeder.php” file and add line of code for factory data.
    Next, open terminal and enter command “php artisan db:seed”. This command will automatically add fake data into your database table.
    4.3. Define relationship between models:
    Product Model: open “app/Model/Product.php” file and add the relationship between User and Product.
    Review Model: open “app/Model/Review.php” file and define relationship for reviews.

    5. Defining the Controller for API:

    5.1. Open “app/Http/Controller/ProductController.php” file and add the method for fetching the data, store data, update data and delete the data.
    Fetching data add code in index() method:
    Store the data in store() method:
    Update the data in update() method:
    Finally, deleting the data in destroy() method:
    5.2. Open “app/Http/Controller/ReviewController.php” file and add the method for fetching the data, store data, update data and delete the data.
    Fetching data add code in index() method:
    Store the data in store() method:
    Update the data in update() method:
    Finally, deleting the data in destroy() method:

    6. Creating Requests: For Product And Review

    Creating the request for product, enter the command “php artisan make:request ProductRequest”
    Adding code for Product request:
    Creating the request for product, enter the command “php artisan make:request ReviewRequest”
    Adding code for Review request:

    7. Creating Resources:

    Next, we have to define the resources for transforming the model and model collection into JSON. Basically when building an API, you may need a transformation layer that sits between your Eloquent models and the JSON responses that are actually returned to your application’s users.
    Command for creating the resources: “php artisan make:resource ResourceName”.
    Creating Resources for Product: in this application we have created the ProductCollection and ProductResource.
    Create ProductResource:
    Create ProductCollection:
    Resource ProductCollection and ProductResource located at “app/Http/Resources/Product” directory.
    Next, open the ProuductResource.php file and add line of code:
    Create ReviewResource: this file located at “app/Http/Resources/ReviewResource.php” directory.
    Next, add line of code under ReviewResource file:

    8. Routes:

    Creating the routes for API, open the “routes/api.php” file and create route for products and reviews.
    Run the command “php artisan route:list” for route the api for products and reviews.

    9. Navigates Routes.

    Open the postman (Postman is a collaboration platform for API development) and run the URL:
    GET Product: http://localhost:8000/api/products:
    PUT Product: http://localhost:8000/api/products/51
    Delete Product: http://localhost:8000/api/products/51
    Review Product: http://localhost:8000/api/products/4

  • Laravel RSS and XML Feed

    In this article, we will discuss about how to create RSS feed in Laravel. But first we will discuss an overview about RSS feed.
    RSS is the type of web feed that allows users and applications to receive regular updates from a website or blog of their choice. RSS stands for Rich Site Summary or it often called Really Simple Syndication. RSS feed is read by an RSS reader or a feed reader, which can be web based, a standalone desktop application or a mobile application.
    An RSS fee is delivered in XML format, allowing maximum compatibility between readers.
    In this article, we are going to use laravelium/feed package for generating RSS feed in Laravel application. So, let’s follow the steps below:

    Step1: Install Laravel Project:

    Open your terminal and run the composer command: “composer create-project –prefer-dist laravel/laravel RssFeed”

    Step2: Install the Packages

    In this step we have to install laravelium/feed package using “composer require laravelium/feed” command.
    After installing the package, we have to add service provider under providers array and aliases array.
    Open “config/app.php” file and add service “Laravelium\Feed\FeedServiceProvider::class,” under providers array like this:
    Next, add services under aliases array like this:
    Publish Configure File:
    Run the command in your terminal for publishing the configure file:
    php artisan vendor:publish –provider=“Laravelium\Feed\FeedServiceProvider”. This process is optional, so, you can skip out this process.

    Step3: Configure SQL Database

    Open your database server and create database like this:
    Next, open .env file and setup database credentials like this:

    Step4: Create Model:

    Next, we have to create model and migration file. So, run the command: php artisan make:model Post –m, here “-m” will create migration file also.
    After running the artisan command, open migration create_posts_table.php file and add line of code like this:
    Next, run the migrate command: php artisan migrate. This command will create tables in your database.

    Step5: Creating Dummy data:

    Now we will create dummy data in your database. Open the database/factories/UserFactory.php file and add the fake table like this:
    Open database/seeds/DatabaseSeeder.php file and add the line like this:
    Next, run database seed command; php artisan db:seed
    After running seed command, 50 records of data feed into post table. You can see database post table like this:

    Step6: Create Controller:

    Now we have to create the controller for rss-feed. Run the command:
    php artisan make:controller PostController
    Next, open the “app/Http/Controller/PostController.php” file and add the following:

    Step7: Define The Routes:

    Open routes/web.php file and define your routes like this:
    Next, open the resources/views/welcome.blade.php file and add an RSS link to the welcome page by adding Feed::link in the section like this:

    Step8: Navigate The Browser:

    Enter the URL: 127.0.0.1:8000/feed and you will get your feed like this:

  • How to make Theme in Laravel?

    In this article, I will show you how to make a theme in Laravel.

    Step1: Installation>

    First install the fresh Laravel project. Run composer command in your terminal:
    “composer create-project –prefer-dist laravel/laravel MyTheme”
    Next, after install the project, run larval-themes command like this: This will install the theme directory in you public directory.
    composer require “facuz/laravel-themes”

    Step2: Theme Configuration

    After installation, open config/app.php file and register the service provider with the application.
    Add service provider at provider array:
    Register the facades in the aliases key of your config/app.php file:
    Run command: publish –provider=“Facuz\Theme\ThemeServiceProvider”. This will publish the configuration.
    This will create a global config file at config/theme.php.
    And also add the theme “APP_THEME=themename” at .env file that we are going to use:

    Step3: Create new Theme

    Run the artisan command for creating theme: php artisan theme:create default
    This command will create theme “default” structure under the public folder like this:

    Step4: Basic Usage of Theme

    In this step, I will show you basic usage of theme, how we can use and create the theme.
    First we will add css and js file in our theme asset directory. You can download bootstrap from https://getbootstrap.com/ site. After downloading the bootstrap file, copy the css and js folder and paste it into public/themes/default/assets directory and as well as add the jquery file under js folder.
    Configuration of assets:
    After adding the file under assets directory, open public/themes/default/config.php file and add assets on the asset method of the config file. The config file is convenient for setting up basic CSS/JS, partial composer, breadcrumb template and also metas.

    Step5: Display view from the controller

    First we need to create a controller, run the artisan command php artisan make:controller HomeController.
    Next, open the controller “app/Http/Controller/HomeController.php” file, add data or define the theme:
    Next, we need to create a view file under resources/views/home/index.blade.php. In this view, I have added basic data for viewing your default structure. You can create your own view according to you.
    Define routes for calling the view from the controller. Open routes/web.php and define routes.
    Browse the URL: 127.0.0.1:8000/theme you will get simple output like this:
    In this output, you can see that there is no header and footer structure define. So you can define your own header and footer in your themes directory and as well as you can add files according to your themes requirements.
    For example: In this example, I have structure our header and footer under public/themes/partials directory:
    public/themes/partials/header.blade.php
    public/themes/partials/footer.blade.php
    Navigate URL: 127.0.0.1:8000/theme in your browser, and you will get output like this:
    So, you can create your own theme by adding different files and customizes your theme according to you.

    Note: you can get more information about this theme package:
    Visit this link: https://packagist.org/packages/facuz/laravel-themes

    Theme Cheatsheet

    Commands:

    Command

    Description

    artisan
    theme:create name

    Generate theme
    structure

    artisan
    theme:destroy name

    Remove a theme

    artisan
    theme:list

    Show a list of
    all themes

    artisan
    theme:duplicate name new

    Duplicate
    theme structure from other theme

    artisan
    theme:widget demo default

    Generate
    widget structure.

    Blade Directives:

    Blade

    Description

    @get(‘value’)

    Magic method
    for get

    @getIfHas(‘value’)

    Like @get but
    show only if exist

    @partial(‘value’,
    [‘var’=> ‘optional’])

    Load the
    partial from current theme.

    @section(‘value’,
    [‘var’=> ‘optional’])

    Like @partial
    but load from sections folder.

    @content()

    Load the
    content of the selected view.

    @styles(‘optional’)

    Render styles
    declared in theme config.

    @scripts(‘optional’)

    Render scripts
    declared in theme config.

    @widget(‘value’,
    [‘var’ => ‘optional’])

    Render widget.

    @protect(‘value’)

    Protect the
    email address against bots or spiders.

    @dd(‘value’)

    Dump and Die

    @d(‘value’)

    Only dump.

    @dv()

    Dump, Die and
    show all defined variables.

  • Laravel Project Testing Using PHPunit

    PHPunit is the unit testing for PHP. This is primarily designed for unit testing, where developers should be able to find mistakes quickly in their newly committed code and assert that no code regression has occurred in other parts of the code base. PHPunit includes a lot of simple and flexible assertions that allow you to easily test your code. Basically, the goal of unit testing is to isolate each part of the program and show that the individual parts are correct.

    Testing In Laravel

    Laravel is built with testing in mind. Basically, Laravel will give you PHPUnit as a testing tool out of the box. By default, the phpunit.xml file is already set up for your application. In Laravel project, under the “tests” directories contains “Feature” and “Unit” directory. Where Feature tests focus on larger portion of your code while Unit tests focus on a very small, isolated portion of your code.

    Before running the test in your project, you should have cleared the cache or session, means that no session or cache data will be persisted while testing. For clearing the cache or configuration, you can use the artisan command “php artisan cache:clear” or “php artisan config:clear”.
    Now, in this article we’ll go through Creating & Running Tests in Laravel.

    1. Install Laravel Project

    Enter the composer command to install Laravel: composer-project –prefer-dist laravel/laravel LaravelTesting.

    2. Creating New Test

    2.1. To create a new test case, use the “make:test” artisan command:

    Create a test in the Feature directory:
    • php artisan make:test NameTest
    Create a test in the Unit directory:
    • php artisan make:test NameTest –unit

    Create a new unit test: php artisan make:test UserModelTest –unit

    After running the command, file will be generated under “tests/Unit/” directory. File will be look like this:

    3. Running Test

    Case1:
    After, test has been generated, go to your terminal and run your tests, execute the “./vendor/bin/phpunit” command from your terminal. This will test your 3 files, one is for “Feature/ExampleTest.php” file and two file for “Unit/ExampleTest.php” and “Unit/UserModelTest.php” files.
    After execute the command, tests will look like this.
    Case2:
    Now suppose, we have created one another new unit test file called NewFileTest:
    Files will be generated under “tests” directory:
    After generated the test file, go to your terminal and run the phpunit command: “./vendor/bin/phpunit”. This will check four files such as “Feature/ExampleTest.php”,“Unit/ExampleTest.php”,“Unit/UserModelTest.php” and “Unit/NewFileTest.php”.
    ./vendor/bin/phpunit
    Case3:
    Now, Let’s change the assertion in “tests/Unit/NewFileTest.php” file like this:
    After changed and save it, go to your terminal and enter the “./vendor/bin/phpunit” command and you’ll get a failure assertion like this:
    There are following PHPUnit test method or assertions and you can use these methods as per your test requirements. To learn about these assertions you can visit this link:
    “https://phpunit.readthedocs.io/en/8.3/assertions.html”
    Some assertions are like this:

    • assertThat()
    • assertTrue()
    • assertFalse()
    • assertDatabaseHas()
    • assertStatus()
    • assertJson()
    • assertNull()
    • assertArrayHasKey()
    • assertEmpty()
    • assertEquals()
    • assertFileEquals()
    • assertFileExists()
    • assertFileReadable()
    • assertSame()
  • Laravel Package

    In this article, I’ll go to through a basic example of how to create a Laravel Package in Laravel with few steps:

    1. Create Project

    Fresh installation of the Laravel using: “composer create-project –prefer-dist lravel/laravel projectname”.

    2. Make Folder For New Package

    After install Laravel project, we will follow steps like:

    • Create a new folder “packages” inside main root folder.
    • Next, inside packages folder we will create another folder which will be our vendor or creator name “digital”.
    • Then inside of vendor folder we’ll create another folder with the name of our package name “calc”.
    • Lastly we need to create a “src” folder which is where the code for our package will live.

    3. Create Composer File For Package

    Next, for our packages we need “composer.json” file because every package should have composer.json file, which will contain dependencies and information about the package itself. So inside your terminal navigate to the folder with your package “calc” name and run the following command: “composer init”

    “composer.json” file look like:

    4. Loading Our Package To Main “composer.json” File

    Next, we need to make our package visible to the Laravel structure, open the main “composer.json” file under the root directory and add the namespaces of our packages in “autoload>psr-4”.

    After adding this, run this command: “composer dump-autoload”.

    5. Creating Service Provider

    Next, create a service provider file under your “Packages/digital/calc/src” directory and don’t forget to use your namespace “Vendor\Package_name”. Basically service provider is the main entry of your package. This is where your package is loaded or booted.

    6. Configure Service Provider

    Next, open “Config/app.php” file and add your service provider inside the “Providers array []”.

    7. Create Routes For Package

    Next, inside of your “src” folder create a new “routes.php” file and write the following code:

    Then go to your Service Provider and add the “routes.php” inside “boot ()” method:

    After this, run command “php artisan serve” and enter the URL http://127.0.0.1:8000/calculator in your browser. This we should end up with the page look like:

    8. Creating Controller For Package

    Inside the packages directory under “src” folder create a new Controller file:

    Under this “CalculatorController.php” file don’t forget to include your package namespace and also include the “App\Http\Controllers\Controller;”

    9. Register The Controller

    After creating the controller we need to register the controller inside our Service Provider class in “register ()” method.

    Next, add routes for this controller inside “routes.php” file:

    10. Creating Views For Package

    To create a view, we need create a “views” folder inside “packages/digital/calc/src” directory then create an “app.blade.php” file inside view folder.

    After creating “add.blade.php”, write following code:

    11. Register The Views

    We need to register the views inside our Service Provider class in “boot ()” method.

    12. Navigate Browser

    After creating controller, views and register into service provider then navigate the browser look like:

    • Addition: http://127.0.0.1:8000/add/14/79
    • Multiply: http://127.0.0.1:8000/multiplication/12/12