Basic questions

Laravel database table naming convention :

Laravel’s naming convention for pivot tables is singularized table names in alphabetical order separated by an underscore. So, if one table is features, and the other table is products, the pivot table will be feature_product.

You are free to use any table name you want (such as product_feature), but you will then need to specify the name of the pivot table in the relationship. This is done using the second parameter to the belongsToMany() function.


What is cUrl?


curl uses libcurl


What is SOAP?

Simple Object Access Protocol | platform independent |based on XML

SOAP allows you to build interoperable software and allows others to take advantage of your software over a network. It defines rules for sending and receiving Remote Procedure Calls (RPC) such as the structure of the request and responses.

someone can formulate and parse a SOAP message in their chosen language


SOAP use in web service


File Handling

$myfile = fopen(“webdictionary.txt”, “r”) or die(“Unable to open file!”);
echo fread($myfile,filesize(“webdictionary.txt”));

r : Open a file for read only.
w : Open a file for write only.
a : Open a file for write only.
a : new file if the file doesn’t
x : Creates a new file for write only
r+ : Open a file for read/write
w+ : Open a file for read/write
a+ : Open a file for read/write
x+ : Creates a new file for read/wright

What is Cookie?

A cookie is a small file with the maximum size of 4KB that the web server stores on the client computer. cookies are part of the HTTP request and response headers


setcookie(cookie_name, cookie_value, [expiry_time], [cookie_path], [domain], [secure], [httponly]);


expiry_time : time() + 3600 for 1 hour

session_destroy() = entire session

uset($_SESSION[‘name]) = fix session variable deleted.


What is mySQL engine

Storage engines are MySQL components that handle the SQL operations for different table types. MySQL uses a pluggable storage engine architecture that enables storage engines to be loaded into and unloaded from a running MySQL server.

InnoDB is a storage engine for the database management system MySQL. MySQL 5.5 and later use it by default

Percona XtraDB is a storage engine for the MariaDB and Percona Server databases, and is intended as a drop-in replacement to InnoDB, which is one of the default engines available on the MySQL database


Type off array in php?

In PHP, there are three types of arrays: Indexed arrays – Arrays with numeric index. Associative arrays – Arrays with named keys. Multidimensional arrays – Arrays containing one or more arrays.



One thought on “Basic questions

Leave a Reply


You are commenting using your account. Log Out /  Change )

Google photo


Twitter picture


Facebook photo


Connecting to %s