Swastik Organization

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@127.0.0.1 ~]# 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...

mysql 0

How to count of duplicate values in MySQL table

To check duplicate records in MySql table, use this simple query $ Select DISTINCT(name) as username, count(name) as usercount from usertable group by name having usercount > 1 This will return a result like...

Freeradius 0

Golden rules of FreeRadius

These golden rules are not my own, but the recommendations from the online documentation listed above. For best results follow them! 1. Do as little as possible—the default configuration should work as is. 2....