Month: June 2023

How to remove public from laravel url

How to remove public from laravel url

In Laravel create .htacess file in your root directory and place the following code. Above code will redirect every public request to normal url. This is the secure method than others. Don’t use the methods of renaming server.php with something else name. It all has security issues.

How to use multiple databases in Laravel

How to use multiple databases in Laravel

You can use multiple databases in laravel using it’s model structure. Lets understand it by an example. Laravel has inbuilt support for multiple database systems, you need to provide connection details in config/database.php file. Define DB_DATABASE, DB_USERNAME, DB_PASSWORD, DB_DATABASE_2, DB_USERNAME_2, DB_PASSWORD_2 env parameters as per your details. After this create your models and define different connection. That’s …

Difference between get and post method PHP

Difference between get and post method PHP

Below given are the differences between get and post method. GET POST Data Visibility: Data is sent in the form of URL parameters which are strings of name-value pairs separated by ampersands(&) Data Visibility: Data sent through the POST method will not be seen in the URL Security: Used to send non-secure data Security: Used …

What is the difference between $message and $$message

What is the difference between $message and $$message ?

The main difference between the $message and $$message is given below: $message $$message $message is a regular variable. $$message is a reference variable. It has a fixed name and stores a fixed value. It stores data about the variable. Data stored in $message is fixed. The value of the $$message can change dynamically as the …

What is Laravel

What is Laravel ?

Laravel is a powerful and popular open-source PHP framework used for web application development. It provides a robust and elegant syntax that simplifies the development process, allowing developers to create high-quality applications with ease. Key Features of Laravel: Conclusion: Laravel has gained immense popularity in the PHP development community due to its elegant syntax, extensive …

What is PHP

What is PHP ?

Introduction: In the vast landscape of programming languages, PHP stands tall as a versatile and widely-used scripting language. Whether you’re a seasoned developer or just starting your coding journey, understanding what PHP is and its capabilities can open up a world of possibilities. In this blog post, we will take a closer look at PHP, …