Posts

Showing posts from September, 2022

Laravel framework Composer run

https://www.javatpoint.com/how-to-install-composer-on-windows https://stackoverflow.com/questions/57947727/when-executing-composer-commands-error-php-is-not-recognized-as-an-internal-o // for deprecated error in vendor files, install composer in windows and run the below command in the root file of source code where composer.json exists, composer update

PHP cmd to create DB without running install in Laravel

Pre-Requisites: php instakked globally (i.e) Environment varibles has the path of php in xampp Laravel source code with database folder containg seed and migration php files Artisian file at root of source code .env file at root of source code with DB user name and password Commands: 1. Go to command prompt and navigate to the root of the source code. 2. Command to create tables php artisan migrate 3. Command to insert row in tables php artisan db:seed

common for php config location code

if (!$config['base_url']) { $domain = $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']; $domain = preg_replace('/index.php.*/', '', $domain); if (!empty($_SERVER['HTTPS'])) { $config['base_url'] = 'https://' . $domain; } else { $config['base_url'] = 'http://' . $domain; } }