BASIC GUIDE ssh root@192.168.0.1 -p 22 adduser hasib ssh -l hasib 192.168.0.1 Update OS Install Apache Install MySQL Install PHP Install Composer (Composer install and globalization) sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin –filename=composer Install Git Set DNS Server Name to Domain Name Provider Panel
DB::select("SELECT db1.employees.name AS employee_name, db2.companies.name as company_name FROM db1.employees employees JOIN db2.companies companies ON companies.code = employees.company_code WHERE companies.country = 'Bangladesh' "); Note: Both database users and passwords have to be the same.
Problem : Max can not return max value from varchar type field. ELOQUENT Query : $maxLicence = Agency::where('is_approved',1)->max('license_no'); RAW SQL Query : select max(test_value) from area_info; Solution : $maxLicence = DB::select("select max(cast(agencys.license_no as int)) as license from agencys");