CoderFunda
  • Home
  • About us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • About us
  • Home
  • Php
  • HTML
  • CSS
  • JavaScript
    • JavaScript
    • Jquery
    • JqueryUI
    • Stock
  • SQL
  • Vue.Js
  • Python
  • Wordpress
  • C++
    • C++
    • C
  • Laravel
    • Laravel
      • Overview
      • Namespaces
      • Middleware
      • Routing
      • Configuration
      • Application Structure
      • Installation
    • Overview
  • DBMS
    • DBMS
      • PL/SQL
      • SQLite
      • MongoDB
      • Cassandra
      • MySQL
      • Oracle
      • CouchDB
      • Neo4j
      • DB2
      • Quiz
    • Overview
  • Entertainment
    • TV Series Update
    • Movie Review
    • Movie Review
  • More
    • Vue. Js
    • Php Question
    • Php Interview Question
    • Laravel Interview Question
    • SQL Interview Question
    • IAS Interview Question
    • PCS Interview Question
    • Technology
    • Other

20 May, 2020

135+ Laravel interview questions and answers in 2020

 Programing Coderfunda     May 20, 2020     Laravel - Interview questions, Laravel - questions     No comments   

Laravel interview questions

1) What is Laravel?
2) Explain Events in laravel ?
3) Explain validations in laravel?
4) How to install laravel via composer ?
5) List some features of laravel 6 ?
6) What is PHP artisan. List out some artisan commands ?
7) List some default packages provided by Laravel Framework?
8) What are named routes in Laravel?
9) What is database migration. How to create migration via artisan ?
10) What are service providers in Laravel ?
11) Explain Laravel’s service container ?
12) What is composer ?
13) What is dependency injection in Laravel ?
14) What are Laravel Contract’s ?
15) Explain Facades in Laravel ?
16) What are Laravel eloquent?
17) How to enable query log in Laravel ?
18) What is reverse routing in Laravel?
19) How to turn off CRSF protection for specific route in Laravel?
20) What are traits in Laravel?
21) Does Laravel support caching?
22) Explain Laravel’s Middleware?
23) What is Lumen?
24) Explain Bundles in Laravel?
25) How to use custom table in Laravel Modal ?




What is Laravel?

Laravel is a free open source "PHP framework" based on the MVC design pattern.
It is created by Taylor Otwell. Laravel provides expressive and elegant syntax that helps in creating a wonderful web application easily and quickly.

Laravel is a Symfony based free open-source PHP web framework. It is created by Taylor Otwell and allows developers to write expressive, elegant syntax. Laravel comes with built-in support for user authentication and authorization which is missing in some most popular PHP frameworks like CodeIgniter, CakePHP.Here you will find Latest Laravel interview questions and answer that helps you crack Laravel Interviews.

Quick Questions About Laravel
Laravel is written In PHP Programming (PHP 7)
Laravel is a PHP Framework for Developing websites and mobile API's.
Laravel is developed By Taylor Otwell
Laravel is Based on MVC architectural pattern
Laravel Dependencies Composer, OpenSSL, PDO, Mbstring, etc.
Laravel Licence MIT License
Laravel Current Stable release 6.9.0



2) Explain Events in laravel ?


An event is an action or occurrence recognized by a program that may be handled by the program or code. Laravel events provides a simple observer implementation, that allowing you to subscribe and listen for various events/actions that occur in your application.

All Event classes are generally stored in the app/Events directory, while their listeners are stored in app/Listeners of your application.



3) Explain validations in laravel?

In Programming validations are a handy way to ensure that your data is always in a clean and expected format before it gets into your database.

Laravel provides several different ways to validate your application incoming data.By default Laravel’s base controller class uses a ValidatesRequests trait which provides a convenient method to validate all incoming HTTP requests coming from client.You can also validate data in laravel by creating Form Request.

Laravel validation Example

$validatedData = $request->validate([
            'name' => 'required|max:255',
            'username' => 'required|alpha_num',
            'age' => 'required|numeric',
        ]);

4) How to install laravel via composer ?

You can install Laravel via composer by running below command.

composer create-project laravel/laravel your-project-name version

5) List some features of laravel 6 ?

Laravel 6 features

Inbuilt CRSF (cross-site request forgery ) Protection.
Inbuilt paginations
Reverse Routing
Query builder
Route caching
Database Migration
IOC (Inverse of Control) Container Or service container.
Job middleware
Lazy collections



6) What is PHP artisan. List out some artisan commands ?
PHP artisan is the command line interface/tool included with Laravel. It provides a number of helpful commands that can help you while you build your application easily. Here are the list of some artisan command:-

php artisan list
php artisan help
php artisan tinker
php artisan make
php artisan –versian
php artisan make model model_name
php artisan make controller controller_name



7) List some default packages provided by Laravel Framework?

Below are a list of some official/ default packages provided by Laravel 

Cashier
Envoy
Passport
Scout
Socialite
Horizon
Telescope


8) What are named routes in Laravel?
Named routing is another amazing feature of Laravel framework. Named routes allow referring to routes when generating redirects or Urls more comfortably.
You can specify named routes by chaining the name method onto the route definition:

Route::get('user/profile', function () {
    //
})->name('profile');

You can specify route names for controller actions:

Route::get('user/profile', 'UserController@showProfile')->name('profile');



9) What is database migration. How to create migration via artisan ?
Migrations are like version control for your database, that’s allow your team to easily modify and share the application’s database schema. Migrations are typically paired with Laravel’s schema builder to easily build your application’s database schema.

Use below commands to create migration data via artisan.

// creating Migration
php artisan make:migration create_users_table





10) What are service providers in Laravel ?
Service Providers are central place where all laravel application is bootstrapped . Your application as well all Laravel core services are also bootstrapped by service providers.
All service providers extend the Illuminate\Support\ServiceProvider class. Most service providers contain a register and a boot method. Within the register method, you should only bind things into the service container. You should never attempt to register any event listeners, routes, or any other piece of functionality within the register method.



11) Explain Laravel’s service container ?
One of the most powerful feature of Laravel is its Service Container. It is a powerful tool for resolving class dependencies and performing dependency injection in Laravel.
Dependency injection is a fancy phrase that essentially means class dependencies are “injected” into the class via the constructor or, in some cases, “setter” methods.

12) What is composer ?
Composer is a tool for managing dependency in PHP. It allows you to declare the libraries on which your project depends on and will manage (install/update) them for you.
Laravel utilizes Composer to manage its dependencies.


13) What is dependency injection in Laravel ?

In software engineering, dependency injection is a technique whereby one object supplies the dependencies of another object. A dependency is an object that can be used (a service). An injection is the passing of a dependency to a dependent object (a client) that would use it. The service is made part of the client’s state.[1] Passing the service to the client, rather than allowing a client to build or find the service, is the fundamental requirement of the pattern.



14) What are Laravel Contract’s ?
Laravel's Contracts are nothing but a set of interfaces that define the core services provided by the Laravel framework.


15) Explain Facades in Laravel ?
Laravel Facades provides a static like an interface to classes that are available in the application’s service container. Laravel self-ships with many facades which provide access to almost all features of Laravel ’s. Laravel facades serve as “static proxies” to underlying classes in the service container and provide benefits of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods of classes. All of Laravel’s facades are defined in the Illuminate\Support\Facades namespace. You can easily access a facade like so:


use Illuminate\Support\Facades\Cache;

Route::get('/cache', function () {
    return Cache::get('key');
});



16) What are Laravel eloquent?
Laravel's Eloquent ORM is simple Active Record implementation for working with your database. Laravel provide many different ways to interact with your database, Eloquent is most notable of them. Each database table has a corresponding “Model” which is used to interact with that table. Models allow you to query for data in your tables, as well as insert new records into the table.

Below is sample usage for querying and inserting new records in Database with Eloquent.


// Querying or finding records from products table where tag is 'new'
$products= Product::where('tag','new');
// Inserting new record 
 $product =new Product;
 $product->title="Iphone 7";
 $product->price="$700";
 $product->tag='iphone';
 $product->save();



17) How to enable query log in Laravel ?
Use the enableQueryLog method to enable query log in Laravel


DB::connection()->enableQueryLog(); 
You can get array of the executed queries by using getQueryLog method:
$queries = DB::getQueryLog();
18) What is reverse routing in Laravel?
Laravel reverse routing is generating URL's based on route declarations. Reverse routing makes your application so much more flexible. It defines a relationship between links and Laravel routes. When a link is created by using names of existing routes, appropriate Uri's are created automatically by Laravel. Here is an example of reverse routing.

// route declaration

Route::get('login', 'users@login');
Using reverse routing we can create a link to it and pass in any parameters that we have defined. Optional parameters, if not supplied, are removed from the generated link.

{{ HTML::link_to_action('users@login') }}
It will automatically generate an Url like http://xyz.com/login in view.

19) How to turn off CRSF protection for specific route in Laravel?
To turn off CRSF protection in Laravel add following codes in “app/Http/Middleware/VerifyCsrfToken.php”


//add an array of Routes to skip CSRF check
private $exceptUrls = ['controller/route1', 'controller/route2'];
 //modify this function
public function handle($request, Closure $next) {
 //add this condition foreach($this->exceptUrls as $route) {
 if ($request->is($route)) {
  return $next($request);
 }
}
return parent::handle($request, $next);
} 
20) What are traits in Laravel?
PHP Traits are simply a group of methods that you want include within another class. A Trait, like an abstract class cannot be instantiated by itself.Trait are created to reduce the limitations of single inheritance in PHP by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies.

Here is an example of trait.

trait Sharable {

  public function share($item)
  {
    return 'share this item';
  }

}
You could then include this Trait within other classes like this:


class Post {

  use Sharable;

}

class Comment {

  use Sharable;

}
Now if you were to create new objects out of these classes you would find that they both have the share() method available:


$post = new Post;
echo $post->share(''); // 'share this item' 

$comment = new Comment;
echo $comment->share(''); // 'share this item'




21) Does Laravel support caching?
Yes, Laravel supports popular caching backends like Memcached and Redis.
By default, Laravel is configured to use the file cache driver, which stores the serialized, cached objects in the file system.For large projects, it is recommended to use Memcached or Redis.


22) Explain Laravel’s Middleware?
As the name suggests, Middleware acts as a middleman between request and response. It is a type of filtering mechanism. For example, Laravel includes a middleware that verifies whether the user of the application is authenticated or not. If the user is authenticated, he will be redirected to the home page otherwise, he will be redirected to the login page.

There are two types of Middleware in Laravel.
Global Middleware: will run on every HTTP request of the application.
Route Middleware: will be assigned to a specific route.


23) What is Lumen?
Lumen is PHP micro-framework that built on Laravel’s top components.It is created by Taylor Otwell. It is perfect option for building Laravel based micro-services and fast REST API’s. It’s one of the fastest micro-frameworks available.
You can install Lumen using composer by running below command

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


24) Explain Bundles in Laravel?
In Laravel, bundles are also called packages. Packages are the primary way to extend the functionality of Laravel. Packages might be anything from a great way to work with dates like Carbon, or an entire BDD testing framework like Behat.In Laravel, you can create your custom packages too. You can read more about packages from


25) How to use custom table in Laravel Modal ?
You can use custom table in Laravel by overriding protected $table property of Eloquent.


Below is sample uses

class User extends Eloquent{
 protected $table="my_user_table";

} 




26) List types of relationships available in Laravel Eloquent?
Below are types of relationships supported by Laravel Eloquent ORM.

One To One
One To Many
One To Many (Inverse)
Many To Many
Has Many Through
Polymorphic Relations
Many To Many Polymorphic Relations
You can read more about relationships in Laravel Eloquent from



27) Why are migrations necessary?
Migrations are necessary because:

Without migrations, database consistency when sharing an app is almost impossible, especially as more and more people collaborate on the web app.
Your production database needs to be synced as well.



28) Provide System requirements for installation of Laravel framework ?
In order to install Laravel, make sure your server meets the following requirements:

PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension


29) List some Aggregates methods provided by query builder in Laravel ?
count()
max()
min()
avg()
sum()

30) How to check request is ajax or not ?
In Laravel, we can use $request->ajax() method to check request is ajax or not.

Example:

      public function saveData(Request $request)
        {
            if($request->ajax()){
                return "Request is of Ajax Type";
            }
            return "Request is of Http type";
        }



31) Explain Inversion of Control, how to implement it.
Inversion of control is a design pattern that is used for decoupling components and layers of a system. Inversion of control(IOC) is implemented through injecting dependencies into a component when it is constructed.


32) What is Singleton design pattern?
Singleton design pattern is a creational pattern that is used whenever only one instance an object is needed to be created. In this pattern, you can't initialize the class.


33) Explain Dependency Injection and its types?
Dependency injection is way to pass one obeject dependencies to another object.It is a broader form of inversion of control (IOC).

There are basically 3 types of dependency injection:

constructor injection
setter injection
Interface injection



34) What is Laravel Vapor?
It is a serverless deployment platform that is powered by AWS.Laravel Vapor provides on-demand auto-scaling with zero server maintenance.


35) What are pros and cons of using Laravel Framework?
Pros of using Laravel Framework
Laravel framework has in-built lightweight blade template engine to speed up compiling task and create layouts with dynamic content easily.
Hassles code reusability.
Eloquent ORM with PHP active record implementation
Built in command line tool “Artisan” for creating a code skeleton , database structure and build their migration
Cons of using laravel Framework
Development process requires you to work with standards and should have real understanding of programming
Laravel is new framework and composer is not so strong in compare to npm (for node.js), ruby gems and python pip.
Development in laravel is not so fast in compare to ruby on rails.
Laravel is lightweight so it has less inbuilt support in compare to django and rails. But this problem can be solved by integrating third party tools, but for large and very custom websites it may be a tedious task


36) What is the Laravel Cursor?
The cursor method in the Laravel is used to iterate the database records using a cursor. It will only execute a single query through the records. This method is used to reduce the memory usage when processing through a large amount of data.

Example of Laravel Cursor

foreach (Product::where(‘name’, ‘Bob’)->cursor() as $fname) {
//do some stuff
}


37) What is the use of dd() in Laravel?
In Laravel, dd() is a helper function used to dump a variable's contents to the browser and stop the further script execution. It stands for Dump and Die. It is used to dump the variable/object and then die the script execution. You can also isolate this function in a reusable functions file or a Class.


38) What is yield in Laravel?
In Laravel, @yield is principally used to define a section in a layout and is constantly used to get content from a child page unto a master page. So, when the Laravel performs blade file, it first verifies if you have extended a master layout, if you have extended one, then it moves to the master layout and commences getting the @sections.


39) How to clear Cache in Laravel?

You can use php artisan cache:clear commnad to clear Cache in Laravel.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

135+ Laravel interview questions and answers in 2020

 Programing Coderfunda     May 20, 2020     Laravel - Interview questions, Laravel - questions     No comments   

Laravel interview questions

1) What is Laravel?
2) Explain Events in laravel ?
3) Explain validations in laravel?
4) How to install laravel via composer ?
5) List some features of laravel 6 ?
6) What is PHP artisan. List out some artisan commands ?
7) List some default packages provided by Laravel Framework?
8) What are named routes in Laravel?
9) What is database migration. How to create migration via artisan ?
10) What are service providers in Laravel ?
11) Explain Laravel’s service container ?
12) What is composer ?
13) What is dependency injection in Laravel ?
14) What are Laravel Contract’s ?
15) Explain Facades in Laravel ?
16) What are Laravel eloquent?
17) How to enable query log in Laravel ?
18) What is reverse routing in Laravel?
19) How to turn off CRSF protection for specific route in Laravel?
20) What are traits in Laravel?
21) Does Laravel support caching?
22) Explain Laravel’s Middleware?
23) What is Lumen?
24) Explain Bundles in Laravel?
25) How to use custom table in Laravel Modal ?




What is Laravel?

Laravel is a free open source "PHP framework" based on the MVC design pattern.
It is created by Taylor Otwell. Laravel provides expressive and elegant syntax that helps in creating a wonderful web application easily and quickly.

Laravel is a Symfony based free open-source PHP web framework. It is created by Taylor Otwell and allows developers to write expressive, elegant syntax. Laravel comes with built-in support for user authentication and authorization which is missing in some most popular PHP frameworks like CodeIgniter, CakePHP.Here you will find Latest Laravel interview questions and answer that helps you crack Laravel Interviews.

Quick Questions About Laravel
Laravel is written In PHP Programming (PHP 7)
Laravel is a PHP Framework for Developing websites and mobile API's.
Laravel is developed By Taylor Otwell
Laravel is Based on MVC architectural pattern
Laravel Dependencies Composer, OpenSSL, PDO, Mbstring, etc.
Laravel Licence MIT License
Laravel Current Stable release 6.9.0



2) Explain Events in laravel ?


An event is an action or occurrence recognized by a program that may be handled by the program or code. Laravel events provides a simple observer implementation, that allowing you to subscribe and listen for various events/actions that occur in your application.

All Event classes are generally stored in the app/Events directory, while their listeners are stored in app/Listeners of your application.



3) Explain validations in laravel?

In Programming validations are a handy way to ensure that your data is always in a clean and expected format before it gets into your database.

Laravel provides several different ways to validate your application incoming data.By default Laravel’s base controller class uses a ValidatesRequests trait which provides a convenient method to validate all incoming HTTP requests coming from client.You can also validate data in laravel by creating Form Request.

Laravel validation Example

$validatedData = $request->validate([
            'name' => 'required|max:255',
            'username' => 'required|alpha_num',
            'age' => 'required|numeric',
        ]);

4) How to install laravel via composer ?

You can install Laravel via composer by running below command.

composer create-project laravel/laravel your-project-name version

5) List some features of laravel 6 ?

Laravel 6 features

Inbuilt CRSF (cross-site request forgery ) Protection.
Inbuilt paginations
Reverse Routing
Query builder
Route caching
Database Migration
IOC (Inverse of Control) Container Or service container.
Job middleware
Lazy collections



6) What is PHP artisan. List out some artisan commands ?
PHP artisan is the command line interface/tool included with Laravel. It provides a number of helpful commands that can help you while you build your application easily. Here are the list of some artisan command:-

php artisan list
php artisan help
php artisan tinker
php artisan make
php artisan –versian
php artisan make model model_name
php artisan make controller controller_name



7) List some default packages provided by Laravel Framework?

Below are a list of some official/ default packages provided by Laravel 

Cashier
Envoy
Passport
Scout
Socialite
Horizon
Telescope


8) What are named routes in Laravel?
Named routing is another amazing feature of Laravel framework. Named routes allow referring to routes when generating redirects or Urls more comfortably.
You can specify named routes by chaining the name method onto the route definition:

Route::get('user/profile', function () {
    //
})->name('profile');

You can specify route names for controller actions:

Route::get('user/profile', 'UserController@showProfile')->name('profile');



9) What is database migration. How to create migration via artisan ?
Migrations are like version control for your database, that’s allow your team to easily modify and share the application’s database schema. Migrations are typically paired with Laravel’s schema builder to easily build your application’s database schema.

Use below commands to create migration data via artisan.

// creating Migration
php artisan make:migration create_users_table





10) What are service providers in Laravel ?
Service Providers are central place where all laravel application is bootstrapped . Your application as well all Laravel core services are also bootstrapped by service providers.
All service providers extend the Illuminate\Support\ServiceProvider class. Most service providers contain a register and a boot method. Within the register method, you should only bind things into the service container. You should never attempt to register any event listeners, routes, or any other piece of functionality within the register method.



11) Explain Laravel’s service container ?
One of the most powerful feature of Laravel is its Service Container. It is a powerful tool for resolving class dependencies and performing dependency injection in Laravel.
Dependency injection is a fancy phrase that essentially means class dependencies are “injected” into the class via the constructor or, in some cases, “setter” methods.

12) What is composer ?
Composer is a tool for managing dependency in PHP. It allows you to declare the libraries on which your project depends on and will manage (install/update) them for you.
Laravel utilizes Composer to manage its dependencies.


13) What is dependency injection in Laravel ?

In software engineering, dependency injection is a technique whereby one object supplies the dependencies of another object. A dependency is an object that can be used (a service). An injection is the passing of a dependency to a dependent object (a client) that would use it. The service is made part of the client’s state.[1] Passing the service to the client, rather than allowing a client to build or find the service, is the fundamental requirement of the pattern.



14) What are Laravel Contract’s ?
Laravel's Contracts are nothing but a set of interfaces that define the core services provided by the Laravel framework.


15) Explain Facades in Laravel ?
Laravel Facades provides a static like an interface to classes that are available in the application’s service container. Laravel self-ships with many facades which provide access to almost all features of Laravel ’s. Laravel facades serve as “static proxies” to underlying classes in the service container and provide benefits of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods of classes. All of Laravel’s facades are defined in the Illuminate\Support\Facades namespace. You can easily access a facade like so:


use Illuminate\Support\Facades\Cache;

Route::get('/cache', function () {
    return Cache::get('key');
});



16) What are Laravel eloquent?
Laravel's Eloquent ORM is simple Active Record implementation for working with your database. Laravel provide many different ways to interact with your database, Eloquent is most notable of them. Each database table has a corresponding “Model” which is used to interact with that table. Models allow you to query for data in your tables, as well as insert new records into the table.

Below is sample usage for querying and inserting new records in Database with Eloquent.


// Querying or finding records from products table where tag is 'new'
$products= Product::where('tag','new');
// Inserting new record 
 $product =new Product;
 $product->title="Iphone 7";
 $product->price="$700";
 $product->tag='iphone';
 $product->save();



17) How to enable query log in Laravel ?
Use the enableQueryLog method to enable query log in Laravel


DB::connection()->enableQueryLog(); 
You can get array of the executed queries by using getQueryLog method:
$queries = DB::getQueryLog();
18) What is reverse routing in Laravel?
Laravel reverse routing is generating URL's based on route declarations. Reverse routing makes your application so much more flexible. It defines a relationship between links and Laravel routes. When a link is created by using names of existing routes, appropriate Uri's are created automatically by Laravel. Here is an example of reverse routing.

// route declaration

Route::get('login', 'users@login');
Using reverse routing we can create a link to it and pass in any parameters that we have defined. Optional parameters, if not supplied, are removed from the generated link.

{{ HTML::link_to_action('users@login') }}
It will automatically generate an Url like http://xyz.com/login in view.

19) How to turn off CRSF protection for specific route in Laravel?
To turn off CRSF protection in Laravel add following codes in “app/Http/Middleware/VerifyCsrfToken.php”


//add an array of Routes to skip CSRF check
private $exceptUrls = ['controller/route1', 'controller/route2'];
 //modify this function
public function handle($request, Closure $next) {
 //add this condition foreach($this->exceptUrls as $route) {
 if ($request->is($route)) {
  return $next($request);
 }
}
return parent::handle($request, $next);
} 
20) What are traits in Laravel?
PHP Traits are simply a group of methods that you want include within another class. A Trait, like an abstract class cannot be instantiated by itself.Trait are created to reduce the limitations of single inheritance in PHP by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies.

Here is an example of trait.

trait Sharable {

  public function share($item)
  {
    return 'share this item';
  }

}
You could then include this Trait within other classes like this:


class Post {

  use Sharable;

}

class Comment {

  use Sharable;

}
Now if you were to create new objects out of these classes you would find that they both have the share() method available:


$post = new Post;
echo $post->share(''); // 'share this item' 

$comment = new Comment;
echo $comment->share(''); // 'share this item'




21) Does Laravel support caching?
Yes, Laravel supports popular caching backends like Memcached and Redis.
By default, Laravel is configured to use the file cache driver, which stores the serialized, cached objects in the file system.For large projects, it is recommended to use Memcached or Redis.


22) Explain Laravel’s Middleware?
As the name suggests, Middleware acts as a middleman between request and response. It is a type of filtering mechanism. For example, Laravel includes a middleware that verifies whether the user of the application is authenticated or not. If the user is authenticated, he will be redirected to the home page otherwise, he will be redirected to the login page.

There are two types of Middleware in Laravel.
Global Middleware: will run on every HTTP request of the application.
Route Middleware: will be assigned to a specific route.


23) What is Lumen?
Lumen is PHP micro-framework that built on Laravel’s top components.It is created by Taylor Otwell. It is perfect option for building Laravel based micro-services and fast REST API’s. It’s one of the fastest micro-frameworks available.
You can install Lumen using composer by running below command

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


24) Explain Bundles in Laravel?
In Laravel, bundles are also called packages. Packages are the primary way to extend the functionality of Laravel. Packages might be anything from a great way to work with dates like Carbon, or an entire BDD testing framework like Behat.In Laravel, you can create your custom packages too. You can read more about packages from


25) How to use custom table in Laravel Modal ?
You can use custom table in Laravel by overriding protected $table property of Eloquent.


Below is sample uses

class User extends Eloquent{
 protected $table="my_user_table";

} 




26) List types of relationships available in Laravel Eloquent?
Below are types of relationships supported by Laravel Eloquent ORM.

One To One
One To Many
One To Many (Inverse)
Many To Many
Has Many Through
Polymorphic Relations
Many To Many Polymorphic Relations
You can read more about relationships in Laravel Eloquent from



27) Why are migrations necessary?
Migrations are necessary because:

Without migrations, database consistency when sharing an app is almost impossible, especially as more and more people collaborate on the web app.
Your production database needs to be synced as well.



28) Provide System requirements for installation of Laravel framework ?
In order to install Laravel, make sure your server meets the following requirements:

PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension


29) List some Aggregates methods provided by query builder in Laravel ?
count()
max()
min()
avg()
sum()

30) How to check request is ajax or not ?
In Laravel, we can use $request->ajax() method to check request is ajax or not.

Example:

      public function saveData(Request $request)
        {
            if($request->ajax()){
                return "Request is of Ajax Type";
            }
            return "Request is of Http type";
        }



31) Explain Inversion of Control, how to implement it.
Inversion of control is a design pattern that is used for decoupling components and layers of a system. Inversion of control(IOC) is implemented through injecting dependencies into a component when it is constructed.


32) What is Singleton design pattern?
Singleton design pattern is a creational pattern that is used whenever only one instance an object is needed to be created. In this pattern, you can't initialize the class.


33) Explain Dependency Injection and its types?
Dependency injection is way to pass one obeject dependencies to another object.It is a broader form of inversion of control (IOC).

There are basically 3 types of dependency injection:

constructor injection
setter injection
Interface injection



34) What is Laravel Vapor?
It is a serverless deployment platform that is powered by AWS.Laravel Vapor provides on-demand auto-scaling with zero server maintenance.


35) What are pros and cons of using Laravel Framework?
Pros of using Laravel Framework
Laravel framework has in-built lightweight blade template engine to speed up compiling task and create layouts with dynamic content easily.
Hassles code reusability.
Eloquent ORM with PHP active record implementation
Built in command line tool “Artisan” for creating a code skeleton , database structure and build their migration
Cons of using laravel Framework
Development process requires you to work with standards and should have real understanding of programming
Laravel is new framework and composer is not so strong in compare to npm (for node.js), ruby gems and python pip.
Development in laravel is not so fast in compare to ruby on rails.
Laravel is lightweight so it has less inbuilt support in compare to django and rails. But this problem can be solved by integrating third party tools, but for large and very custom websites it may be a tedious task


36) What is the Laravel Cursor?
The cursor method in the Laravel is used to iterate the database records using a cursor. It will only execute a single query through the records. This method is used to reduce the memory usage when processing through a large amount of data.

Example of Laravel Cursor

foreach (Product::where(‘name’, ‘Bob’)->cursor() as $fname) {
//do some stuff
}


37) What is the use of dd() in Laravel?
In Laravel, dd() is a helper function used to dump a variable's contents to the browser and stop the further script execution. It stands for Dump and Die. It is used to dump the variable/object and then die the script execution. You can also isolate this function in a reusable functions file or a Class.


38) What is yield in Laravel?
In Laravel, @yield is principally used to define a section in a layout and is constantly used to get content from a child page unto a master page. So, when the Laravel performs blade file, it first verifies if you have extended a master layout, if you have extended one, then it moves to the master layout and commences getting the @sections.


39) How to clear Cache in Laravel?

You can use php artisan cache:clear commnad to clear Cache in Laravel.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

10 January, 2020

Import/Upload Excel file into MySQL using Codeigniter

 Programing Coderfunda     January 10, 2020     CodeIgniter - Import, CodeIgniter - Upload/Excel     No comments   

On this codeigniter excel,csv import tutorial, we will would really like to share with you the way to import records as excel or csv report format in codeigniter. Excel and csv is the pleasant technique to import facts in a report and you may effortlessly import records to excel or csv using codeigniter excel library.

====>> Codeigniter Import Excel,CSV <<====

Contents.....

Download Codeigniter Latest
Basic Configurations
Download phpExcel Library
Create Library
Create Database With Table
Setup Database Credentials
Make New Controller
Create model
Create Views
Start Development server
Conclusion


Step 1:- First, we need to download  PHPExcel Library. Then extract PHPExcel Library inside “application/third_party” folder.

Download  PHPExcel Library

Step 2:- Create database and table or  copy below code and run in mysql for create table



CREATE TABLE `organization` (
  `id` int(10) NOT NULL,
  `org_name` varchar(150) NOT NULL,
  `org_code` int(50) NOT NULL,
  `gst_no` varchar(200) NOT NULL,
  `org_type` varchar(50) NOT NULL,
  `Address` varchar(40) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


Step 3:- Now create controller file Import.php and copy below code and paste in import.php file.

<?php 

defined('BASEPATH') OR exit('No direct script access allowed'); 
 
class Import extends CI_Controller { 

function __construct() {
        parent::__construct();
        $this->load->database();
        $this->load->model('import_model', 'import');
    }
     

  public function uploadCsv(){
   
    $this->load->view('upload');
  }
  public function uploadData(){

  if ($this->input->post('submit')) {
           
            $path = 'uploads/';
            require_once APPPATH . "/third_party/PHPExcel.php";
            $config['upload_path'] = $path;
            $config['allowed_types'] = 'xlsx|xls';
            $config['remove_spaces'] = TRUE;
            $this->load->library('upload', $config);
            $this->upload->initialize($config);           
            if (!$this->upload->do_upload('uploadFile')) {
                $error = array('error' => $this->upload->display_errors());
            } else {
                $data = array('upload_data' => $this->upload->data());
            }
            if(empty($error)){
              if (!empty($data['upload_data']['file_name'])) {
                $import_xls_file = $data['upload_data']['file_name'];
            } else {
                $import_xls_file = 0;
            }
            $inputFileName = $path . $import_xls_file;
           
            try {
                $inputFileType = PHPExcel_IOFactory::identify($inputFileName);
                $objReader = PHPExcel_IOFactory::createReader($inputFileType);
                $objPHPExcel = $objReader->load($inputFileName);
                $allDataInSheet = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true);
                $flag = true;
                $i=0;
                foreach ($allDataInSheet as $value) {
                  if($flag){
                    $flag =false;
                    continue;
                  }
                  $inserdata[$i]['org_name'] = $value['A'];
                  $inserdata[$i]['org_code'] = $value['B'];
                  $inserdata[$i]['gst_no'] = $value['C'];
                  $inserdata[$i]['org_type'] = $value['D'];
                  $inserdata[$i]['Address'] = $value['E'];
                  $i++;
                }             
                $result = $this->import->importdata($inserdata); 
                if($result){
                  echo "Imported successfully";
                }else{
                  echo "ERROR !";
                }           

          } catch (Exception $e) {
               die('Error loading file "' . pathinfo($inputFileName, PATHINFO_BASENAME)
                        . '": ' .$e->getMessage());
            }
          }else{
              echo $error['error'];
            }
           
           
    }
    $this->load->view('upload');
  }
}
?>



Step 4:- Now create import_model.php inside model folder and copy below code and paste in import_model.php


<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Import_model extends CI_Model {

    public function importData($data) {

        $res = $this->db->insert_batch('organization',$data);
        if($res){
            return TRUE;
        }else{
            return FALSE;
        }

    }

}


?>


Step 5:- Now create view file inside view folder and copy below code and paste in upload.php file

<form action="<?php echo base_url();?>form/uploadData" method="post" enctype="multipart/form-data">
    Upload excel file :
    <input type="file" name="uploadFile" value="" /><br><br>
    <input type="submit" name="submit" value="Upload" />
</form>



Note : You can use without Excelfile Library

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Import/Upload Excel file into MySQL using Codeigniter

 Programing Coderfunda     January 10, 2020     CodeIgniter - Import, CodeIgniter - Upload/Excel     No comments   

On this codeigniter excel,csv import tutorial, we will would really like to share with you the way to import records as excel or csv report format in codeigniter. Excel and csv is the pleasant technique to import facts in a report and you may effortlessly import records to excel or csv using codeigniter excel library.

====>> Codeigniter Import Excel,CSV <<====

Contents.....

Download Codeigniter Latest
Basic Configurations
Download phpExcel Library
Create Library
Create Database With Table
Setup Database Credentials
Make New Controller
Create model
Create Views
Start Development server
Conclusion


Step 1:- First, we need to download  PHPExcel Library. Then extract PHPExcel Library inside “application/third_party” folder.

Download  PHPExcel Library

Step 2:- Create database and table or  copy below code and run in mysql for create table



CREATE TABLE `organization` (
  `id` int(10) NOT NULL,
  `org_name` varchar(150) NOT NULL,
  `org_code` int(50) NOT NULL,
  `gst_no` varchar(200) NOT NULL,
  `org_type` varchar(50) NOT NULL,
  `Address` varchar(40) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


Step 3:- Now create controller file Import.php and copy below code and paste in import.php file.

<?php 

defined('BASEPATH') OR exit('No direct script access allowed'); 
 
class Import extends CI_Controller { 

function __construct() {
        parent::__construct();
        $this->load->database();
        $this->load->model('import_model', 'import');
    }
     

  public function uploadCsv(){
   
    $this->load->view('upload');
  }
  public function uploadData(){

  if ($this->input->post('submit')) {
           
            $path = 'uploads/';
            require_once APPPATH . "/third_party/PHPExcel.php";
            $config['upload_path'] = $path;
            $config['allowed_types'] = 'xlsx|xls';
            $config['remove_spaces'] = TRUE;
            $this->load->library('upload', $config);
            $this->upload->initialize($config);           
            if (!$this->upload->do_upload('uploadFile')) {
                $error = array('error' => $this->upload->display_errors());
            } else {
                $data = array('upload_data' => $this->upload->data());
            }
            if(empty($error)){
              if (!empty($data['upload_data']['file_name'])) {
                $import_xls_file = $data['upload_data']['file_name'];
            } else {
                $import_xls_file = 0;
            }
            $inputFileName = $path . $import_xls_file;
           
            try {
                $inputFileType = PHPExcel_IOFactory::identify($inputFileName);
                $objReader = PHPExcel_IOFactory::createReader($inputFileType);
                $objPHPExcel = $objReader->load($inputFileName);
                $allDataInSheet = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true);
                $flag = true;
                $i=0;
                foreach ($allDataInSheet as $value) {
                  if($flag){
                    $flag =false;
                    continue;
                  }
                  $inserdata[$i]['org_name'] = $value['A'];
                  $inserdata[$i]['org_code'] = $value['B'];
                  $inserdata[$i]['gst_no'] = $value['C'];
                  $inserdata[$i]['org_type'] = $value['D'];
                  $inserdata[$i]['Address'] = $value['E'];
                  $i++;
                }             
                $result = $this->import->importdata($inserdata); 
                if($result){
                  echo "Imported successfully";
                }else{
                  echo "ERROR !";
                }           

          } catch (Exception $e) {
               die('Error loading file "' . pathinfo($inputFileName, PATHINFO_BASENAME)
                        . '": ' .$e->getMessage());
            }
          }else{
              echo $error['error'];
            }
           
           
    }
    $this->load->view('upload');
  }
}
?>



Step 4:- Now create import_model.php inside model folder and copy below code and paste in import_model.php


<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Import_model extends CI_Model {

    public function importData($data) {

        $res = $this->db->insert_batch('organization',$data);
        if($res){
            return TRUE;
        }else{
            return FALSE;
        }

    }

}


?>


Step 5:- Now create view file inside view folder and copy below code and paste in upload.php file

<form action="<?php echo base_url();?>form/uploadData" method="post" enctype="multipart/form-data">
    Upload excel file :
    <input type="file" name="uploadFile" value="" /><br><br>
    <input type="submit" name="submit" value="Upload" />
</form>



Note : You can use without Excelfile Library

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

08 July, 2019

C++ in Hindi Introduction

 Programing Coderfunda     July 08, 2019     C++-Introduction     No comments   


C ++ का परिचयC ++ एक ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग लैंग्वेज है। C ++ को Bjarne Stroustrup द्वारा विकसित किया गया था। C ++ में आने से पहले, c और Simula 67 दो लोकप्रिय भाषाएँ थीं। ब्रेज़ेन स्ट्रॉस्ट्रुप दोनों भाषाओं के साथ मिलकर ऐसी भाषा बनाना चाहता था, जिसमें ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग की सभी विशेषता


C ++ was developed in Bell Labs in 1979. C ++ is a middle level language. Features high level and low level languages All features of C language are found in C ++ There are 3 important features of C ++ object oriented Low level easy to learn Use of C ++ C ++ is used and how you can use it, let's try it out. C ++ is the most commonly used software. Such as C ++ is used to create a device driver. This is a multipurpose language You can use it to crack big software Today C ++ is mostly used for education purposes. Because the features of all major languages ​​have been taken from C ++ If you understand C ++ then you can easily understand other languages ​​as well. The extension of the C ++ c language Therefore, all those software that can be created in C ++ too. If you want to work on the lower level as well as the highest level then you are using C ++ Mostly, as is new programming language, it does not openly support the pointer. If you want to create software using the indicator, you can use C ++ Object-oriented principle Further information about object-oriented theory to be supported by C ++ is explained further. class Class is a user-defined data type This is similar to the structure in the same language. But in sections you can do changes related to changes as well as those related to them. A class provides a data-centric approach to programmers. By the class you can separate the variable and related tasks. More about this you learn from the C ++ - class and object tutorials. The objects As you know, Class is a user-defined data type The class By object you can access the squares and functions of the square. Abstraction Abstraction means that the end user should be the same functional show, which needs to be hased, hidden background functionality For example, when you drive a car, you only focus on clutch, gear and steering, you have no sense in how the engine is working. encapsulation In other words Encapsulation Encapsulation is a one-object oriented programming feature that binds data members (variables) and related tasks such as in the class. Also, encapsulation is protected from access to outside data and functions. Encapsulation property provides protection for level 3 (public, private, protected) Encapsulation is implemented through the classes Inheritance Inheritance Object Oriented Programming Concept In which one code can be used elsewhere This principle code re-usable implementation For example, you can do the work that has been created in a class in the second category, so that you do not need to re-write these tasks. And you will be able to access them from both classes. Polymorphism Polymorphism means a name has many functions. In it you have to implement many types of tasks with one name. Polymorphous work in C ++ is implemented by overloading in which the functions of a name are executed in different situations Messaging In object-oriented programming, objects interact with each other, from which shows the real-life situation. A sample C ++ program # <iostream> INT main () { cout << "Hello Reader"; Return 0; } This example is being specified below. The header file is included in the first row. You need this header file After the start of the program Simple message has printed through the cout function Work is refunded by return statement The program given below was produced and produced. Hello reader In this tutorial, you have learned about C ++ history, applications and different features. Data is important in any program Only all operations are performed on data Before you start programming in C ++, you need to know about various data types of C ++
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

C++ in Hindi Introduction

 Programing Coderfunda     July 08, 2019     C++-Introduction     No comments   


C ++ का परिचय C ++ एक ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग लैंग्वेज है। C ++ को Bjarne Stroustrup द्वारा विकसित किया गया था। C ++ में आने से पहले, c और Simula 67 दो लोकप्रिय भाषाएँ थीं। ब्रेज़ेन स्ट्रॉस्ट्रुप दोनों भाषाओं के साथ मिलकर ऐसी भाषा बनाना चाहता था, जिसमें ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग की सभी विशेषता


C ++ was developed in Bell Labs in 1979. C ++ is a middle level language. Features high level and low level languages All features of C language are found in C ++ There are 3 important features of C ++ object oriented Low level easy to learn Use of C ++ C ++ is used and how you can use it, let's try it out. C ++ is the most commonly used software. Such as C ++ is used to create a device driver. This is a multipurpose language You can use it to crack big software Today C ++ is mostly used for education purposes. Because the features of all major languages ​​have been taken from C ++ If you understand C ++ then you can easily understand other languages ​​as well. The extension of the C ++ c language Therefore, all those software that can be created in C ++ too. If you want to work on the lower level as well as the highest level then you are using C ++ Mostly, as is new programming language, it does not openly support the pointer. If you want to create software using the indicator, you can use C ++ Object-oriented principle Further information about object-oriented theory to be supported by C ++ is explained further. class Class is a user-defined data type This is similar to the structure in the same language. But in sections you can do changes related to changes as well as those related to them. A class provides a data-centric approach to programmers. By the class you can separate the variable and related tasks. More about this you learn from the C ++ - class and object tutorials. The objects As you know, Class is a user-defined data type The class By object you can access the squares and functions of the square. Abstraction Abstraction means that the end user should be the same functional show, which needs to be hased, hidden background functionality For example, when you drive a car, you only focus on clutch, gear and steering, you have no sense in how the engine is working. encapsulation In other words Encapsulation Encapsulation is a one-object oriented programming feature that binds data members (variables) and related tasks such as in the class. Also, encapsulation is protected from access to outside data and functions. Encapsulation property provides protection for level 3 (public, private, protected) Encapsulation is implemented through the classes Inheritance Inheritance Object Oriented Programming Concept In which one code can be used elsewhere This principle code re-usable implementation For example, you can do the work that has been created in a class in the second category, so that you do not need to re-write these tasks. And you will be able to access them from both classes. Polymorphism Polymorphism means a name has many functions. In it you have to implement many types of tasks with one name. Polymorphous work in C ++ is implemented by overloading in which the functions of a name are executed in different situations Messaging In object-oriented programming, objects interact with each other, from which shows the real-life situation. A sample C ++ program # <iostream> INT main () { cout << "Hello Reader"; Return 0; } This example is being specified below. The header file is included in the first row. You need this header file After the start of the program Simple message has printed through the cout function Work is refunded by return statement The program given below was produced and produced. Hello reader In this tutorial, you have learned about C ++ history, applications and different features. Data is important in any program Only all operations are performed on data Before you start programming in C ++, you need to know about various data types of C ++
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Introduction to HTML Tags

 Programing Coderfunda     July 08, 2019     HTML-Tag     No comments   

Introduction to HTML Tags

An HTML file is a combination of tags and text. HTML tags are also called HTML elements. If you understand the concept of tags, you can easily understand HTML. Because HTML works entirely through tags.

When HTML was designed in the beginning, it was used only to display text in webpages. HTML was very limited at that time and there were only few tags in it. The process of displaying text in webpages by HTML tags was called marking the text. This is why HTML was called text markup language.



At that time, HTML was used only by computer scientists who published their papers on HTML the world wide web so that other scientists could read them. But the HTML was so simple and effective that it became very popular and many people started using it.

Slowly as soon as the HTML became popular, the need to show different elements in webpages increased. Now HTML is not just a text markup language. Now you can insert various types of elements such as lists, tables images, audio, video, graphics etc. into webpages via HTML.

Elements (lists, tables, images, video, etc.) are inserted in HTML tags only in any webpage. Whatever you want to add to the webpage will be added by tags only. HTML provides you many tags for this. All these tags are familiar with the interpreter.



Interpreter is a program that happens in all web browsers. This program recognizes HTML tags and shows them the meaning of text, images, lists and tables corresponding to the same in the web page.

By Basically tags you tell the interpreter what you want to display in the webpage. For example, if you want to add an image to a webpage, you will define <img> tag in its HTML file.

The purpose of most HTML tags can be understood only by their name. For example, <table> tag is used to insert table in webpage. As you begin to use them, you can easily remember what a particular tag is used for.

Syntax of HTML Tags
Generally there are 3 parts of the HTML tag. Opening tag is initially applied. This lets the interpreter know what you are going to do. After the opening tag, the text is written on which this tag is being applied. After this the closing tag is written.

Interpreters from the closing tag know that this tag used to exist. To separate the closing tag from the opening tag, the forward slash is applied in the closing tag.

The general syntax of HTML tags is being given below.

<tagName> text </ tagName>
Not all HTML tags are cloned by the closing tag. There are also HTML tags that are defined only by the opening tag. Such tags are called empty tags. Their syntax is being given below.

<tagName>
There are also some types of tags in HTML that are defined by both the opening and closing parts of the same part. The name of the first tag is written after which the forward slash is applied. Their syntax is being given below.

<tagName />
Types of HTML Tags
There are many types of tags available in HTML. Some tags are used to format text, then some are used for inserting multimedia elements such as images, audio, video etc.

Some tags of HTML are used to create structures such as tables, sections, and lists, so some tags also work like containers under which other tags are define that are sub tags.



The tags of all types of HTML are divided into some main categories and being told below.

Basic Tags
Basic tags are tags that are essentially used in all HTML documents. These tags define the core structure of an HTML document. The list of basic tags of HTML is given below.

<html> - This tag defines an HTML file. Every HTML file is started with the same tag.
<head> - In this tag, related scripts and styles are defined from the webpage.
<title> - This tag defines the title of the web page.
<body> - The main content of the webpage is defined in this tag.
Formatting Tags
Formatting tags are tags that are used to format text. These tags only apply to text and control the presentation of text. The list of the formatting tags of HTML is given below.

<i> - Text is made to italic by this tag.
<b> - The text is bolded by this tag.
<u> - Text is underline with this tag.
<ins> - This tag defines such text which has been added to the content later.
<mark> - Text is highlighted by this tag.
<sup> - Text from this tag is defined as a superscript.
<sub> - Text from this tag is defined as subscript.
<small> - This tag is defined as a small text.
<del> - Text is deleted from this tag.
<strong> - Text from this tag is shown bold (bold).
Form and Input Tags
Form and input tags in the form of creating forms and user-input
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Introduction to HTML Tags

 Programing Coderfunda     July 08, 2019     HTML-Tag     No comments   

Introduction to HTML Tags

An HTML file is a combination of tags and text. HTML tags are also called HTML elements. If you understand the concept of tags, you can easily understand HTML. Because HTML works entirely through tags.

When HTML was designed in the beginning, it was used only to display text in webpages. HTML was very limited at that time and there were only few tags in it. The process of displaying text in webpages by HTML tags was called marking the text. This is why HTML was called text markup language.



At that time, HTML was used only by computer scientists who published their papers on HTML the world wide web so that other scientists could read them. But the HTML was so simple and effective that it became very popular and many people started using it.

Slowly as soon as the HTML became popular, the need to show different elements in webpages increased. Now HTML is not just a text markup language. Now you can insert various types of elements such as lists, tables images, audio, video, graphics etc. into webpages via HTML.

Elements (lists, tables, images, video, etc.) are inserted in HTML tags only in any webpage. Whatever you want to add to the webpage will be added by tags only. HTML provides you many tags for this. All these tags are familiar with the interpreter.



Interpreter is a program that happens in all web browsers. This program recognizes HTML tags and shows them the meaning of text, images, lists and tables corresponding to the same in the web page.

By Basically tags you tell the interpreter what you want to display in the webpage. For example, if you want to add an image to a webpage, you will define <img> tag in its HTML file.

The purpose of most HTML tags can be understood only by their name. For example, <table> tag is used to insert table in webpage. As you begin to use them, you can easily remember what a particular tag is used for.

Syntax of HTML Tags
Generally there are 3 parts of the HTML tag. Opening tag is initially applied. This lets the interpreter know what you are going to do. After the opening tag, the text is written on which this tag is being applied. After this the closing tag is written.

Interpreters from the closing tag know that this tag used to exist. To separate the closing tag from the opening tag, the forward slash is applied in the closing tag.

The general syntax of HTML tags is being given below.

<tagName> text </ tagName>
Not all HTML tags are cloned by the closing tag. There are also HTML tags that are defined only by the opening tag. Such tags are called empty tags. Their syntax is being given below.

<tagName>
There are also some types of tags in HTML that are defined by both the opening and closing parts of the same part. The name of the first tag is written after which the forward slash is applied. Their syntax is being given below.

<tagName />
Types of HTML Tags
There are many types of tags available in HTML. Some tags are used to format text, then some are used for inserting multimedia elements such as images, audio, video etc.

Some tags of HTML are used to create structures such as tables, sections, and lists, so some tags also work like containers under which other tags are define that are sub tags.



The tags of all types of HTML are divided into some main categories and being told below.

Basic Tags
Basic tags are tags that are essentially used in all HTML documents. These tags define the core structure of an HTML document. The list of basic tags of HTML is given below.

<html> - This tag defines an HTML file. Every HTML file is started with the same tag.
<head> - In this tag, related scripts and styles are defined from the webpage.
<title> - This tag defines the title of the web page.
<body> - The main content of the webpage is defined in this tag.
Formatting Tags
Formatting tags are tags that are used to format text. These tags only apply to text and control the presentation of text. The list of the formatting tags of HTML is given below.

<i> - Text is made to italic by this tag.
<b> - The text is bolded by this tag.
<u> - Text is underline with this tag.
<ins> - This tag defines such text which has been added to the content later.
<mark> - Text is highlighted by this tag.
<sup> - Text from this tag is defined as a superscript.
<sub> - Text from this tag is defined as subscript.
<small> - This tag is defined as a small text.
<del> - Text is deleted from this tag.
<strong> - Text from this tag is shown bold (bold).
Form and Input Tags
Form and input tags in the form of creating forms and user-input
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

HTML Introduction

 Programing Coderfunda     July 08, 2019     HTML-Introduction     No comments   

Introduction to Hypertext Markup Language (HTML)

A way to present HTML information in a beautiful and attractive way in the World Wide Web. HTML was created in 1991 by Tim Berners lee.
Let's first try to understand the meaning of HTML. The full form of HTML is Hyper Text Markup Language. Each of these words has a special meaning that is explained by detail below.
HyperHyper means that the HTML does not work in the sequence. As in any programming language, the next statement execute after a statement is executed. If there is a link in an HTML file and the user clicks on it, then it opens.
It does not matter how many elements are there before and whether they are all loaded or not. All the elements of an HTML file are independent of each other. It is also not necessary that any other HTML file can not be executed before any HTML file. Like all HTML elements, all HTML files are independent from each other.
TextText is the most important in a web page. Text is the information that is used to present web page design. HTML text is used to format and present in web pages.

Markup

Markup means format of layout and style of text. You mark text by tag. The kind of tags that mark the text, the text is displayed in the web page. For example, if you mark a text by <h1> tag, then that text will appear as a large and bold heading in the webpage.

Language

HTML is a language used for web development.
So what is HTML? (A simple definition in plain hindi)
HTML is a Hyper Text Markup Language that is used to create web pages.
By using different tags of HTML you create web pages and add various elements such as images, audio, video, tables, lists, links and text to them. HTML is the first language taught and taught in the field of web designing.


Cascading Style Sheet (CSS) is also used with HTML, which is used to make webpage even better. Apart from this, using JavaScript with HTML, logic is added to web pages and they are made dynamic.
HTML VersionsSo far there have been many versions of HTML in the industry. Some new elements are added in every version of HTML. All the editions of HTML are explained in detail below.
HTML 1.0This was the first version of HTML. At that time very few people knew about this language and HTML was too limited. At that time nothing more could be done by HTML than creating web pages with simple text.
HTML 2.0This version contained all the features of HTML 1.0. Along with this version, the basic website for developing the HTML website was already done.
HTML 3.0Until the arrival of this version the HTML was very popular. This version was stopped due to a compatibility problem with browsers. But later it was introduced with new and advanced tags.
HTML 3.2In this version some new tags have been added after the previous version. This was the time when the W3C declared the HTML standard for website development. The use of HTML was no longer limited and was being used extensively.
HTML 4.01This version was introduced with some new tags as well as the cascading style sheet. At this time HTML had become completely modern language.
HTML 5.0This is the latest version of HTML. In this, some new tags have been provided for multimedia support. You can get more information about HTML 5 from the HTML5 in Hindi tutorial.
XHTMLThis version came after HTML 4.01. It was added to XML with HTML.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

HTML Introduction

 Programing Coderfunda     July 08, 2019     HTML-Introduction     No comments   

Introduction to Hypertext Markup Language (HTML)

A way to present HTML information in a beautiful and attractive way in the World Wide Web. HTML was created in 1991 by Tim Berners lee.
Let's first try to understand the meaning of HTML. The full form of HTML is Hyper Text Markup Language. Each of these words has a special meaning that is explained by detail below.
HyperHyper means that the HTML does not work in the sequence. As in any programming language, the next statement execute after a statement is executed. If there is a link in an HTML file and the user clicks on it, then it opens.
It does not matter how many elements are there before and whether they are all loaded or not. All the elements of an HTML file are independent of each other. It is also not necessary that any other HTML file can not be executed before any HTML file. Like all HTML elements, all HTML files are independent from each other.
TextText is the most important in a web page. Text is the information that is used to present web page design. HTML text is used to format and present in web pages.

Markup

Markup means format of layout and style of text. You mark text by tag. The kind of tags that mark the text, the text is displayed in the web page. For example, if you mark a text by <h1> tag, then that text will appear as a large and bold heading in the webpage.

Language

HTML is a language used for web development.
So what is HTML? (A simple definition in plain hindi)
HTML is a Hyper Text Markup Language that is used to create web pages.
By using different tags of HTML you create web pages and add various elements such as images, audio, video, tables, lists, links and text to them. HTML is the first language taught and taught in the field of web designing.


Cascading Style Sheet (CSS) is also used with HTML, which is used to make webpage even better. Apart from this, using JavaScript with HTML, logic is added to web pages and they are made dynamic.
HTML VersionsSo far there have been many versions of HTML in the industry. Some new elements are added in every version of HTML. All the editions of HTML are explained in detail below.
HTML 1.0This was the first version of HTML. At that time very few people knew about this language and HTML was too limited. At that time nothing more could be done by HTML than creating web pages with simple text.
HTML 2.0This version contained all the features of HTML 1.0. Along with this version, the basic website for developing the HTML website was already done.
HTML 3.0Until the arrival of this version the HTML was very popular. This version was stopped due to a compatibility problem with browsers. But later it was introduced with new and advanced tags.
HTML 3.2In this version some new tags have been added after the previous version. This was the time when the W3C declared the HTML standard for website development. The use of HTML was no longer limited and was being used extensively.
HTML 4.01This version was introduced with some new tags as well as the cascading style sheet. At this time HTML had become completely modern language.
HTML 5.0This is the latest version of HTML. In this, some new tags have been provided for multimedia support. You can get more information about HTML 5 from the HTML5 in Hindi tutorial.
XHTMLThis version came after HTML 4.01. It was added to XML with HTML.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

20 June, 2019

Remove duplicates form CSV - PHP Coding Help

 Programing Coderfunda     June 20, 2019     No comments   

<?php
$filename 
= "file.csv"; $file = fopen($filename, "r"); $read = fread($file, filesize($filename));
$split = array_unique(explode("\n", $read));
fclose($file);
$filename2 = "other.csv";
$file2 = fopen($filename2, "a");

foreach(
$split as $key=>$value) {
    if(
$value != "") {
        
fwrite($file2, $value . "\n");
    }
}
fclose($file2);

echo 
"Update done successfully."; ?> 
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Remove duplicates form CSV - PHP Coding Help

 Programing Coderfunda     June 20, 2019     No comments   

<?php
$filename 
= "file.csv"; $file = fopen($filename, "r"); $read = fread($file, filesize($filename));
$split = array_unique(explode("\n", $read));
fclose($file);
$filename2 = "other.csv";
$file2 = fopen($filename2, "a");

foreach(
$split as $key=>$value) {
    if(
$value != "") {
        
fwrite($file2, $value . "\n");
    }
}
fclose($file2);

echo 
"Update done successfully."; ?> 
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

18 June, 2019

Jquery Checkbox check all

 Programing Coderfunda     June 18, 2019     Checkbox, Jquery     No comments   

<input type="checkbox" id="checkAll" > Check All
    <hr />
    <input type="checkbox" id="checkItem"> Item 1
    <input type="checkbox" id="checkItem"> Item 2
    <input type="checkbox" id="checkItem"> Item3


<script>
$("#checkAll").click(function(){
    $('input:checkbox').not(this).prop('checked', this.checked);
});
</script>
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

Jquery Checkbox check all

 Programing Coderfunda     June 18, 2019     Checkbox, Jquery     No comments   

<input type="checkbox" id="checkAll" > Check All
    <hr />
    <input type="checkbox" id="checkItem"> Item 1
    <input type="checkbox" id="checkItem"> Item 2
    <input type="checkbox" id="checkItem"> Item3


<script>
$("#checkAll").click(function(){
    $('input:checkbox').not(this).prop('checked', this.checked);
});
</script>
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Newer Posts Older Posts Home

Meta

Popular Posts

  • Sitaare Zameen Par Full Movie Review
     Here’s a  complete Vue.js tutorial for beginners to master level , structured in a progressive and simple way. It covers all essential topi...
  • AI foot tracking model
    I am a student doing a graduation project. I urgently need to deal with this model (I am attaching a link). I've never worked with pytho...
  • Laravel Search String
      Laravel Search String is a package by   Loris Leiva   that generates database queries based on one unique string using a simple and custom...
  • Writing and debugging Eloquent queries with Tinkerwell
    In this article, let's look into the options that you can use with Tinkerwell to write and debug Eloquent queries easier. The post Wr...
  • Laravel - Installation
    For managing dependencies, Laravel uses   composer . Make sure you have a Composer installed on your system before you install Laravel. In t...

Categories

  • Ajax (26)
  • Bootstrap (30)
  • DBMS (42)
  • HTML (12)
  • HTML5 (45)
  • JavaScript (10)
  • Jquery (34)
  • Jquery UI (2)
  • JqueryUI (32)
  • Laravel (1017)
  • Laravel Tutorials (23)
  • Laravel-Question (6)
  • Magento (9)
  • Magento 2 (95)
  • MariaDB (1)
  • MySql Tutorial (2)
  • PHP-Interview-Questions (3)
  • Php Question (13)
  • Python (36)
  • RDBMS (13)
  • SQL Tutorial (79)
  • Vue.js Tutorial (69)
  • Wordpress (150)
  • Wordpress Theme (3)
  • codeigniter (108)
  • oops (4)
  • php (853)

Social Media Links

  • Follow on Twitter
  • Like on Facebook
  • Subscribe on Youtube
  • Follow on Instagram

Pages

  • Home
  • Contact Us
  • Privacy Policy
  • About us

Blog Archive

  • July (4)
  • September (100)
  • August (50)
  • July (56)
  • June (46)
  • May (59)
  • April (50)
  • March (60)
  • February (42)
  • January (53)
  • December (58)
  • November (61)
  • October (39)
  • September (36)
  • August (36)
  • July (34)
  • June (34)
  • May (36)
  • April (29)
  • March (82)
  • February (1)
  • January (8)
  • December (14)
  • November (41)
  • October (13)
  • September (5)
  • August (48)
  • July (9)
  • June (6)
  • May (119)
  • April (259)
  • March (122)
  • February (368)
  • January (33)
  • October (2)
  • July (11)
  • June (29)
  • May (25)
  • April (168)
  • March (93)
  • February (60)
  • January (28)
  • December (195)
  • November (24)
  • October (40)
  • September (55)
  • August (6)
  • July (48)
  • May (2)
  • January (2)
  • July (6)
  • June (6)
  • February (17)
  • January (69)
  • December (122)
  • November (56)
  • October (92)
  • September (76)
  • August (6)

Loading...

Laravel News

Loading...

Copyright © CoderFunda | Powered by Blogger
Design by Coderfunda | Blogger Theme by Coderfunda | Distributed By Coderfunda