How to install Laravel on windows?

Install laravel on windows

Today’s tutorial will teach you how to install laravel on windows.Installing Laravel is very simple than you think.Follow the below steps to install laravel.

We will use composer for installing laravel ,So our first question will be what is Composer.

Composer : Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

No need is worry about composer ,installing composer is very easy ,here is the simple tutorial on how to install composer on xampp

Now, back to laravel.

Laravel: Laravel is very simple and powerfull Php Framewok.It’s simplicity make it most popular among the developer’s.

System Requirement for Laravel

  • PHP >= 5.6.4
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

You can  install Laravel by issuing the Composer create-project command in your terminal:

Go to the folder where you want to install laravel and open command prompt within this folder.For xampp goto C:\xampp\htdocs

composer create-project --prefer-dist laravel/laravel blog

Note:In above command “blog” is your sitefoldername

Now ,your have installed laravel ,now the next steps are as follows:

1)Set Application Key

You can install the application key by running  php artisan key:generate command.

Typically, this string should be 32 characters long. The key can be set in the .env environment file. If you have not renamed the .env.example file to .env, you should do that now. If the application key is not set, your user sessions and other encrypted data will not be secure!

2)Set Directory Permissions

Directories within the storage and the bootstrap/cache directories should be writable by your web serve.

 

 

Hope ,I am able to help you to install laravel on windows.

Please like ,share ,comment.

 

 

How to install Composer on Xampp?

Today’s tutorial is about how to install composer on Xampp, so our first question here will be what is “Composer”?

What is Composer?

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

And here is the simple way to download Composer.

Go to the url  http://www.getcomposer.org/Composer-Setup.exe to download the Composer.Is’nt it Simple?

And after downloading the composer ,follow the steps asked by composer installer.

 

MongoDB Simple Example

Following code demonstrates how to:

  • Use the PyMongo library to connect to a Mongo database
  • Insert documents into a collection
  • Display all of the documents from the collection

 

from pymongo import MongoClient

connection= MongoClient('localhost',27017)
 
# connect to the school database and the student collection
db = connection.school.student
 
# create a dictionary to hold student documents
 
# create dictionary
student_record = {}
 
# set flag variable
flag = True
 
# loop for data input
while (flag):
   # ask for input
   student_name=raw_input("Enter student name: ")
   student_grade=raw_input("Enter student grade: ")
   # place values in dictionary
   student_record = {'name':student_name,'grade':student_grade}
   # insert the record
   db.insert(student_record)
   # should we continue?
   flag = input('Enter another record? ')
   if (flag[0].upper() == 'N'):
      flag = False
 
# find all documents
results = db.find()
 
print()
print('+-+-+-+-+-+-+-+-+-+-+-+-+-+-')
 
# display documents from collection
for record in results:
# print out the document
print(record['name'] + ',',record['grade'])
 
print()
 
# close the connection to MongoDB
connection.close()

Insert, Read, Update, Delete in MongoDB using PyMongo

Recently, I had the opportunity of working on Python web application with MongoDB as back end. In this PyMongo tutorial, I’ll brief about MongoDB Insert, Read, Update, Delete Using Python.

 

First of all a short intro of MongoDB and PyMongo :

  • MongoDB :MongoDB is an open-source document database and leading NoSQL database. MongoDB is written in C++.
  • PyMongo :PyMongo is a Python distribution containing tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.

Now, let’s make use of PyMongo to interact with MongoDb.Import the MongoClient from PyMongo.

from pymongo import MongoClient

Now,Create a client connection to the MongoDb instance running on the local machine

client = MongoClient('localhost:27017')
db = client.EmployeeDb   #EmployeeDb is database name

Now that we have the database connection, let’s use the mongo db API to insert document to the database collection using the following command:

Insert document to the database

 employeeId = raw_input('Enter Employee id :')
  employeeName= raw_input('\nEnter name to add\n')
db.Employees.insert_one(
        {
        "id": employeeId,
        "name":employeeName,
   
        })

Read Document From MongoDb

 empCol = db.Employees.find()
    print '\n All data from EmployeeDb Database \n'
    for emp in empCol:
        print emp

Update Document From MongoDb


 criteria = raw_input('\nEnter id to update\n')
    name = raw_input('\nEnter name to update\n')
   

    db.Employees.update_one(
        {"id": criteria},
        {
        "$set": {
            "name":name
           
        }
        }
    )
    print "\nRecords updated successfully\n"    

Delete Document From MongoDb

 criteria = raw_input('\nEnter employee id to delete\n')
 db.Employees.delete_many({"id":criteria})
 print '\nDeletion successful\n' 

why seo is important

why seo is important

Today we are going to learn why seo is important and why we need seo.I have already written article on Seo best practices 2016 and Best seo plugins for wordpress ,you can check them out.

So first of all we are going to know what is Seo.

What is Seo (Search Engine Optimisation )?

In short Seo means making your website/blog Search engine friendly.

Wikipedia’s Defination of Seo

Search engine optimization (SEO) is the process of affecting the visibility of a website or a web page in a web search engine’s unpaid results—often referred to as “natural”, “organic”, or “earned” results. In general, the earlier (or higher ranked on the search results page), and more frequently a site appears in the search results list, the more visitors it will receive from the search engine’s users, and these visitors can be converted into customers.

Now back to our topic why seo is important?

1. SEO brings your Business traffic.
2. SEO gives you unmatched insight into your customers.
3. SEO provides higher relevance and credibility for your business.
4. SEO has one of the best ROI’s (Return On Investment) in advertising.
5. SEO is the number one source of leads.
6. SEO is the most  profitable forms of marketing.
7. SEO is good for business visibility ,branding and digital presence.