How to Increase PHP Memory Limits
Why are PHP memory limits important to your website development journey? PHP is a famous backend technology that is used by many tech giants for supporting their applications. PHP gives many advanced features for making web pages dynamic and integrating some features you can not simply get using javascript, HTML, and CSS.
how to create new module in Laravel
To make modules use the artisan command php artisan module:make ModuleName to create a module called Post:
php artisan module:make Post
This will create a module in the path Modules/Post
You can create multiple modules in one command by specifying the names separately:
php artisan module:make Customer Contact User Post
install laravel 10 with composer
Laravel is a web application framework with expressive, elegant syntax. A web framework provides a structure and starting point for creating your application, allowing you to focus on creating something amazing while we sweat the details.
Laravel strives to provide an amazing developer experience while providing powerful features such as thorough dependency injection, an expressive database abstraction layer, queues and scheduled jobs, unit and integration testing, and more.
conditional form fields drupal programmatically
Drupal's Form API #states property allows to easily show or hide, enable or disable, require or collapse form fields based on values selected or entered in other fields on that form or anywhere else on the page.
How can I convert Hijri date to gregorian in PHP?
I would like convert this date:09/13/1436 (it is Hijiri) to 2015-06-30(it is Gregorian). I tried that:
function HijriToJD($m, $d, $y){
return (int)((11 * $y + 3) / 30) + 354 * $y +
30 * $m - (int)(($m - 1) / 2) + $d + 1948440 - 385;
}
$date = HijriToJD(9, 13, 1436);
echo jdtogregorian($date);
HTML Styles - CSS
CSS stands for Cascading Style Sheets.
CSS saves a lot of work. It can control the layout of multiple web pages all at once.
What is CSS?
Cascading Style Sheets (CSS) is used to format the layout of a webpage.
With CSS, you can control the color, font, the size of text, the spacing between elements, how elements are positioned and laid out, what background images or background colors are to be used, different displays for different devices and screen sizes, and much more!
Using CSS
CSS can be added to HTML documents in 3 ways:
HTML Basic Examples
In this chapter we will show some basic HTML examples.
Don't worry if we use tags you have not learned about yet.
HTML Documents
All HTML documents must start with a document type declaration: <!DOCTYPE html>
.
The HTML document itself begins with <html>
and ends with </html>
.
The visible part of the HTML document is between <body>
and </body>
.
Easy Learning with HTML "Try it Yourself"
HTML is the standard markup language for Web pages.
Easy Learning with HTML "Try it Yourself". With our "Try it Yourself" editor, you can edit the HTML code and view the result:
<!DOCTYPE html>
<html>
<head>
<title>This is Page Title</title>
</head>
<body>
<h1>This is a h1 text</h1>
<p>This is a paragraph text.</p>
</body>
</html>
How to Add Dependency Injection in a Controller in Drupal 8+
Dependency Injection is a design pattern that helps decouple the different components of a software application. It is a software design pattern that helps to manage the dependencies between different components in a software system. It involves passing the required dependencies into a class, rather than letting the class create or locate them itself.
Programmatically create a user account drupal
I know that I can programmatically create a user using the following code, in Drupal .
<?php
use Drupal\user\Entity\User;
// Create user object.
$user = User::create();
//Mandatory settings
$user->setPassword("password");
$user->enforceIsNew();
$user->setEmail("email");
$user->setUsername("username");
$user->addRole('role_name');
$user->set("field_machine_name", 'value');
$user->save();