Skip to content

Instantly share code, notes, and snippets.

View deepak-cotocus's full-sized avatar

deepak-cotocus

View GitHub Profile
// Fonts
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
// Variables
@import "variables";
// Bootstrap
//@import "~bootstrap-sass/assets/stylesheets/bootstrap"; //remove this line
@import "~bootstrap/scss/bootstrap.scss"; //add this line
@deepak-cotocus
deepak-cotocus / Demo-app\app\Http\Controllers\TestController.php
Created May 5, 2020 11:03
Using Mail class of Laravel for sending a mail
<?php
namespace App\Http\Controllers;
use App\Http\Controllers;
use Mail;
use Illuminate\Http\Request;
use App\Mail\TestEmailSender;
use Illuminate\Support\Facades\Log;
<?php
namespace App\Http\Controllers;
use App\Http\Controllers;
use Mail;
use Illuminate\Http\Request;
use App\Mail\TestEmailSender;
use Illuminate\Support\Facades\Log;
@deepak-cotocus
deepak-cotocus / Send-email-in-Laravel.md
Last active May 6, 2020 15:58
Sending Email in Laravel

Assumption

\app\Http\Controllers\TestController.php This is the file which will invoke email sending logic.

Steps

1. Open Git bash terminal and run the below command:

php artisan make:mail TestEmailSender
  • The above command will create \app\Mail\TestEmailSender.php with below code
@deepak-cotocus
deepak-cotocus / Email-server-set-up-for-Laravel-App.md
Last active May 7, 2020 07:55
Gmail Email server set up for Laravel App

When do we need this Configuration?

Ans- When we have to Configure Gmail SMTP Server in Laravel Application

Our .env file looks like this after Configuration:

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=ENTER_YOUR_EMAIL_ADDRESS(GMAIL)
MAIL_PASSWORD=ENTER_YOUR_GMAIL_PASSWORD
@deepak-cotocus
deepak-cotocus / Laravel-application-from-scratch.md
Last active May 7, 2020 11:11
Laravel application from scratch

How to develop your first application with full authentication in LARAVEL?

Steps

1. Open git bash in required folder and run below commands to create a laravel project.

composer create-project laravel/laravel Demo-App  "5.5.*" --prefer-dist
composer install
npm install
@deepak-cotocus
deepak-cotocus / local-set-up-guide.md
Created May 19, 2020 09:02
Local set up guide for "myhospitalnow.com"

This browser does not support PDFs. Please download the PDF to view it: Download PDF.

@deepak-cotocus
deepak-cotocus / virtual-host-creation.md
Last active June 5, 2020 10:13
How to create Virtual Hosts on XAMPP in Windows10

virtual-host image credit goes to https://www.ibm.com/

Why do we Setup "Name-Based Virtual Host":

The term Virtual Host refers to the practice of running more than one web site (such as Demo.Website1.com and Demo.Website2.com) on a single machine. Virtual hosts can be "IP-based", meaning that you have a different IP address for every web site, or "name-based", meaning that you have multiple names running on each IP address. The fact that they are running on the same physical server is not apparent to the end user.

With name-based virtual hosting, the server relies on the client to report the hostname as part of the HTTP headers. Using this technique, many different hosts can share the same IP address.

Name-based virtual hosting is usually simpler, since you need only configure your DNS server to map each hostname to the correct IP address and then configure the Apache HTTP Server to recognize the di

@deepak-cotocus
deepak-cotocus / laravel-migration-add-column.md
Last active July 7, 2020 12:03
How to add a column to an existing table using migration in laravel.

Steps to add a column or columns to an existing table using migration in laravel.

  • Laravel Migration Example Tutorial. This tutorial explain you step by step, how you can add single or multiple columns in your existing database tables.

  • Sometimes there is a need to add new columns in your database tables. Today we will show you how to add new columns or columns to an existing table using Laravel migration.

Let’s have a table called Schools where the table you want to add phone_number type.

Add a single Column an existing table

STEP 1:

@deepak-cotocus
deepak-cotocus / Laravel-Queue-Supervisor-configuration.md
Last active July 10, 2024 10:24
Laravel Queue Supervisor configuration

How to use Supervisor:A Process Control System for Laravel queue In Linux based OS

What is Supervisor: A Process Control System?

Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. Supervisor provides you with one place to start, stop, and monitor your processes. Processes can be controlled individually or in groups. You can configure Supervisor to provide a local or remote command line and web interface.


Why do we use Supervisor for Larave Queue?

The supervisor is a process manager which Laravel suggests to use as a process monitor for queue workers. It will automatically start the queue worker in the background, even after the system has booted and will automatically restart the worker if the worker exits unexpectedly.