This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LEMP Stack Setup - Ubuntu | |
=================================Install Nginx ========================== | |
sudo apt update | |
sudo apt install nginx | |
sudo ufw status | |
sudo ufw app list | |
i. sudo ufw allow 'Nginx Full' | |
ii. sudo ufw allow 'OpenSSH' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": 22, | |
"full_name": "Azizul Hakim", | |
"email": "[email protected]", | |
"phone": "01711111111", | |
"gender": "Female", | |
"role_id": 3, | |
"user_slug": "provider-1", | |
"profile_photo": "https://takecare.ltd/storage/uploads/user_file/service1647145932622d73cc4a0a1.jpg", | |
"speciality_id": 2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Config; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\ServiceProvider; | |
class MailConfigServiceProvider extends ServiceProvider | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*CREATE TABLE posts ( | |
id int NOT NULL, | |
title varchar(255) NOT NULL, | |
PRIMARY KEY (id) | |
);*/ | |
/*CREATE TABLE view_table ( | |
id int NOT NULL, | |
post_id int NOT null, | |
view_col int default 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Disable Back Button in Browser - Online Demo</title> | |
<style type="text/css"> | |
body, input { | |
font-family: Calibri, Arial; | |
} | |
</style> | |
<script type="text/javascript"> | |
window.history.forward(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==== CENTOS 7 LEMP STACK INSTALLATION ==== | |
0. Make sure the centos 7 server have internet connection | |
1. Install the EPEL Repository | |
sudo yum -y install epel-release | |
2. Install the Remi Repository | |
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm | |
3. Install Nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "start of current quarter date: "; | |
$startofQuarter = Carbon::now()->startOfQuarter(); | |
echo $startofQuarter; | |
echo "\n"; | |
echo "end of current quarter date: "; | |
$startofQuarter = Carbon::now()->endOfQuarter(); | |
echo $startofQuarter; | |
echo "\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//app/Facades/CustomRoute.php | |
namespace App\Facades; | |
use Illuminate\Support\Facades\Facade; | |
/** | |
* @method static \Illuminate\Routing\PendingResourceRegistration apiResource(string $name, string $controller, array $options = []) | |
* @method static \Illuminate\Routing\PendingResourceRegistration resource(string $name, string $controller, array $options = []) | |
* @method static \Illuminate\Routing\Route any(string $uri, array|string|callable|null $action = null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Api; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\JsonResponse; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Auth; | |
use Illuminate\Support\Facades\Validator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
show tables; | |
select * from orders; | |
select * from orders order by orders_id desc limit 5; | |
-- MySQL dump 10.13 Distrib 5.7.33, for Win64 (x86_64) | |
-- | |
-- Host: localhost Database: student | |
-- ------------------------------------------------------ | |
-- Server version 5.7.33 |