Environment in Laravel 5.3

Laravel comes with many stunning features. One of them is definitely database migrations. In the next chapter we’ll discuss about migration in detail.
Before that we need to understand our environment properly. What is environment in Laravel? If you look at the document root you will find an ‘.env’ file. It basically says about the database connections. Where would we get that default database set up file? In the ‘config’ folder, we have a ‘database.php’ file. Open it up and see the content.

Continue reading “Environment in Laravel 5.3”

Routing in Laravel 5.3

Routing, a Static Method


Routing is the concept of setting up a new URI like http://localhost:8000/hello. It will take you to a destination web page. Laravel makes it extremely simple. It’s a static method that accepts two things: an URI and an anonymous function or Closure.
In the ‘app/Http/routes.php’ it’s been defined primarily. Start your favorite text editor and open the file. What you see?
You see some code like this:

Route::get('/', function () {
return view('welcome');
});

Continue reading “Routing in Laravel 5.3”

Ethical Hacking for beginners

My first book on Ethical Hacking is now available in Lanpub and Amazon.


here are the Contents:

Prologue
Introduction
What is Ethical Hacking?
How You Can Use Many Tools?
The Legal Side
Prerequisites
Basic Hacking Terms
Build Your Hacking Environment
What Is VirtualBox?
Install Kali Linux & Other Operating Systems in VB
Linux Terminals and Basic Functionalities
Should I Know Any Programming Language?
Protect Your Anonymity on Internet
1) Tor
2) Proxy Chains
3) VPN
4) All About Mac Address

# Prologue

This book is intended for complete programming beginners or general people who know nothing about any programming language but want to learn ethical hacking. Ethical Hacking, by no means, is associated with any kind of illegal electronic activities. They always stay within laws. This book is intended for those people – young and old – who are creative and curious and who want to develop a creative hobby or take up internet security profession acting as ethical hacker.

Continue reading “Ethical Hacking for beginners”

Inheritance, Encapsulation, Abstract Class and Interface in PHP 7

In Dictionary if you search the word ‘inheritance’, you’d land up finding this kind of description: …objects that someone gives you when they die.
In the programming world, it does not mean exactly the same in every sense but almost same if you take the literal meaning. Yes, there is a parent class with one or more child classes who inherit the objects from their parents but child classes are freer here, in the php programming world. These child classes are free to modify or override the properties and methods that they inherit. In real world it does not happen always.
Let us a have a simple code to check a parent class and child class.

Continue reading “Inheritance, Encapsulation, Abstract Class and Interface in PHP 7”

Hiding Information in PHP 7

If you have already read the previous blog, you should have noticed that there was a hole in the previous code.
Did you notice that?
Let us examine this part of code:

$guiter = new Instrument('Elictric Guiter');
$guiter->setWeight(1);
$guiter->getWeight();
$guiter->weight = 10;
var_dump($guiter);

And the output is simply mind blowing.

object(Instrument)#1 (2) {
["name"]=>
string(15) "Elictric Guiter"
["weight"]=>
int(10)
}

Continue reading “Hiding Information in PHP 7”

Getter and Setter in PHP 7

Get, Set and Go…

In any class the properties play very roles. Till now we use ‘public’ before every property. In the real world the situation may not be same.
Imagine an ‘Instrument’ class. In the construct part you can pass the name of the instrument. Besides, you can have a property – ‘weight’. Let us write the code first and see the output.

Continue reading “Getter and Setter in PHP 7”

Overview of Classes and Objects in PHP 7

A class is a blueprint. A plan of doing something. Suppose we want to keep reviews through a class. Objects contain data and methods to send and receive messages.
It decides how a ‘review’ object will behave in future. Every object may not behave in the same fashion because one review may remain incomplete. You’ve to think every possibility before planning a class. It’s a good practice to have your pen and notebook ready so that you can write it down completely. What you’re going to do will be your flow chart. And the code you write inside your class will be your algorithm.
Now we have a ‘Review’ class.

Continue reading “Overview of Classes and Objects in PHP 7”

Composer-revolution and library of codes

Composer is a dependency management tool in PHP. For any PHP project you need to use your library of codes. Composer easily manages that task on your behalf helping you to declare those codes. You can also install or update any code in your library through composer. Please visit https://getcomposer.org for more details.
In the opening page of https://getcomposer.org, click the ‘getting started’ link.

composer home page

composer home page


In the above page you find two links – ‘locally’ and ‘globally’. It stands for two options. Suppose you don’t want to run composer globally or centrally in your system. In that case, you have to download and install composer each time for every project. But the global option is always preferable because once composer is installed in your system bin folder you can call it any time for any project.

Continue reading “Composer-revolution and library of codes”

Learn Laravel 5.2.45


Chapter 1. Composer

Composer is a dependency management tool in PHP. For any PHP project you need to use your library of codes. Composer easily manages that task on your behalf helping you to declare those codes. You can also install or update any code in your library through composer. Please visit https://getcomposer.org for more details.
In the opening page of https://getcomposer.org, click the ‘getting started’ link.

Composer Home Page

Composer Home Page


In the above page you find two links – ‘locally’ and ‘globally’. It stands for two options. Suppose you don’t want to run composer globally or centrally in your system. In that case, you have to download and install composer each time for every project. But the global option is always preferable because once composer is installed in your system bin folder you can call it anytime for any project.

Continue reading “Learn Laravel 5.2.45”