Author: swoAdmin

php 0

Laravel .env variable always returns null

As per the Laravel document “Once the configuration has been cached, the .env file will not be loaded and all calls to the env function will return null.” You can find it here

php 0

Install new copy of Laravel

Install new copy of Laravel   Install Composer 1. Go to the Root command prompt and execute the below commands # sudo apt update # sudo apt install curl php-cli php-mbstring git unzip #...

php 0

Laravel Soft Delete

Laravel Soft Delete Soft Delete Data Base  In database add column ‘deleted_at’ in the table deleted_at Field, default NULL value Model In model file add ‘use SoftDeletes’ statement use Illuminate\Database\Eloquent\SoftDeletes; class User extends Model...

centos1 0

systemctl command not found

Q. systemctl: command not found [root@ ~]# sudo systemctl daemon-reload sudo: systemctl: command not found Ans. CentOS 6 does not use systemd. On CentOS 6 we use chkconfig command to start/active the service automatically...

php 0

How to remove the first character of string in PHP

The substr() function is the good solution: $NewString = substr($OldString, 1); Strings are indexed starting from 0, and substr() functions will start from second parameter to store new value into into variable. So the...

php 0

How to detect duplicate values in PHP array

In PHP one dimensional array to find the duplicate values use array_count_values($Array) For example, given the following array: $Array = array(‘Neha’, ‘Komal’, ‘Nidhi’, ‘Niti’, ‘Komal’, ‘Nidhi’, ‘Gaurav’, ‘Kittu’, ‘Komal’); I would like to print:...

linux-600x300 0

How To Set Date and Time in Unix

In Unix/Linux, the date command displays and set the current day, date, time, and year. To check the current date and time, write date command on unix console [root@localhost ~]# date Thu Jun 16...