Tag: php

  • Steps to Install laravel

    Steps to Install laravel

    To Install Laravel follow following points: Use command: Composer global require Laravel/installer Then change the directory to htdocs from cd.. command After that cerate project using following command             Laravel new project_name It takes some time when it’s done then open the project to any editor like visual studio then Use terminal and check the…

  • What is Laravel?

    What is Laravel?

    Laravel is a PHP framework for creating Websites that work well with MySQL database and follows MVC – Model view and controller. Model represent data stored in database View represent the HTML template that send to the browser. Controller is the middle between model and view. the main work of controller is to get the…

  • PHP Interface

    PHP Interface

    Interfaces allow us to specify what methods/functions of a class should implement. It’s quite easy to use a variety of different classes in the same way. When one or more classes use the same interface, it is referred to as “polymorphism”. <?php  interface Course  {   public function showCourse();  }  class Course1 implements Course  {…

  • PHP Polymorphism

    PHP Polymorphism

    There are two types of Polymorphism; i.e.  Compile time (function overloading) Run time (function overriding) But PHP “does not support” compile time polymorphism, which means function overloading and operator overloading. <?php class Course1{             public function showCourse()             {                         echo “Course 1”;             } } class Course2 extends Course1{             public function showCourse()            …