Skip to main content
Blog IT Information technology

Main navigation

  • Home
  • Contact us

User account menu

  • Log in
  • Register

October 2023

  1. Home
  2. Monthly Archive
  3. Monthly Archive

How to Load Node, File, Taxonomy Entities by ID in Drupal 8+

To load node details using its id in Drupal 8+ uses the following syntax:

$node_details = Node::load($nid);
$node_details->field_FIELD_NAME->value;

We can load multiple nodes in Drupal 8+ using load multiple() function. Note that the parameter should be an array of ids.

Blog IT Blog IT
1 year 4 months ago
Read More

Configure and Display a Schedule of Opening Hours in PHP

Opening Hours is a PHP package by Spatie to query and format a set of business operating hours. You can use it to present the times per day and include exceptions for things like holidays and other days off on a given year-specific date or recurring (happening each year). The project's readme file has this example to illustrate how you can configure hours:

Blog IT Blog IT
1 year 4 months ago
Read More

LangCountry is a Localization Package for Laravel

The Laravel LangCountry is a localization package that provides automatic date formatting, language switching, and more. Defining language detection and configuration can be tedious, so this package can make it easier to support multiple locales and the following feature list:

Blog IT Blog IT
1 year 4 months ago
Read More

Building a Sitemap in your Laravel app with the Spatie Sitemap

According to Google, most sites would benefit from a sitemap, which helps bots know what pages should be crawled.

A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships between them. Search engines like Google read this file to crawl your site more efficiently. A sitemap tells Google which pages and files you think are important in your site, and also provides valuable information about these files. For example, when the page was last updated and any alternate language versions of the page.

Blog IT Blog IT
1 year 4 months ago
Read More

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.

Blog IT Blog IT
1 year 4 months ago
Read More

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

 

Blog IT Blog IT
1 year 4 months ago
Read More

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.

Blog IT Blog IT
1 year 4 months ago
Read 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.

Blog IT Blog IT
1 year 4 months ago
Read More

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);

Blog IT Blog IT
1 year 4 months ago
Read More

Subscribe to the Newsletter

Blog Category

Web
Mobile
Security
Design

Tags keyword

html
css
php
Sass
html5
drupal
drupal 8
drupal 9
drupal 10
laravel
symfony
vue.js
vue
js
css3
jquery
javascript
image
table
iframe
link
mail
twig
drush
module
git
gitflow
web
drupal 7

Monthly archive

  • May 2018 (1)
  • May 2019 (1)
  • November 2019 (1)
  • December 2019 (1)
  • March 2020 (2)
  • May 2020 (3)
  • June 2020 (2)
  • July 2020 (3)
  • November 2020 (1)
  • December 2021 (3)
  • October 2022 (1)
  • November 2022 (7)
  • December 2022 (15)
  • February 2023 (1)
  • April 2023 (1)
  • May 2023 (2)
  • June 2023 (3)
  • July 2023 (4)
  • August 2023 (8)
  • September 2023 (3)
  • October 2023 (9)
  • November 2023 (5)
  • September 2024 (1)

Copyright © 2025 - Blog Information technology - Sitemap