Skip to content

Instantly share code, notes, and snippets.

View putheakhem's full-sized avatar
🏠
Working from home

Khem Puthea putheakhem

🏠
Working from home
View GitHub Profile

Laravel 5.8 : Config, ENV, Migrations, and Todos CRUD

What you will learn ?

  • How to configure .ENV File

Laravel 5.8 : Intro, Setup , MVC Basics, and Views.

@Khem Puthea June 2019

What You Will Learn In This Series

  • Installing and setting up Laravel locally.
  • Models, Views, and Controllers (MVC).
  • Database, Migrations, and Eloquent ORM.
  • Authentication.
@putheakhem
putheakhem / logout.php
Created June 6, 2019 16:15
use to clear session from login
<?php
session_start();
unset($_SESSION["username"]);
unset($_SESSION["password"]);
echo 'You have cleaned session';
header('Refresh: 2; URL = login.php');
?>
@putheakhem
putheakhem / login.php
Last active June 7, 2019 03:41
Login form with PHP7
<!--
Author: Khem Puthea
@2019-June-06
-->
<?php
ob_start();
session_start();
?>
@putheakhem
putheakhem / TerminatorConfiguration.md
Last active February 23, 2019 03:33
Terminator configuration on ubuntu 18.04

#Ubuntu 18.04 LTS

Install Dependencies

  sudo apt-get install git curl vim

Install Terminator (shell)

/*
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects.
It will generate several classes such as:
.m-r-10 which gives margin-right 10 pixels.
.m-r-15 gives MARGIN to the RIGHT 15 pixels.
.m-t-15 gives MARGIN to the TOP 15 pixels and so on.
.p-b-5 gives PADDING to the BOTTOM of 5 pixels
.p-l-40 gives PADDING to the LEFT of 40 pixels
@putheakhem
putheakhem / setAttribute.html
Created November 21, 2017 15:39
HTML DOM setAttribute() Method
<!DOCTYPE html>
<html>
<head>
<style>
.democlass {
color: red;
}
</style>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS DOM paragraph style</title>
</head>
<body>
<p id ='text'>JavaScript Exercises - by Mr Khem Puthea</p>
<div>
// use onclick action
@putheakhem
putheakhem / JavaScriptDOM-1.html
Last active November 21, 2017 08:27
Here is a sample html file with a submit button. Now modify the style of the paragraph text through javascript code
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS DOM paragraph style</title>
</head>
<body>
<p id ='text'>JavaScript Exercises - by Mr Khem Puthea</p>
<div>
<button id="jsStyle"
@if($errors->has())
@foreach ($errors->all() as $error)
<div>{{ $error }}</div>
@endforeach
@endif