1) we can use inbult server that mean we create project folder at anywhere in our computer and simply run php -S localhost:8080 to start server with our projects 2) Avoiding Naming Collisions: Namespaces provide a way to organize code and avoid naming collisions. They allow you to define classes, functions, constants, etc., with the same name in different namespaces without conflicts. 3) call_user_func() 4) ob_start - buffering php output before sent it browser 5) The $$key expression takes the value of $key and treats it as the name of a variable. 6) To build complex query we need table columns for that we can it table schema from db Note : 1)instead of seting layout on controller we can set it directly in view 2) I think we dont need DbModel file 3) We should not save all details in session because some time we changed the details in other devices. 4) In packagiest site we can register the package 5) IN composer.json , under autoload and psr-4 we can define namespace for specific directory. To set public folder as a entry point ======================================= 1) On windows, D:\xampp\apache\conf\httpd 1) Enable - LoadModule rewrite_module modules/mod_rewrite.so 2) Set up virtual host ex: ServerName localhost DocumentRoot D:\xampp\htdocs\php_framework\public Options Indexes FollowSymLinks AllowOverride All Require all granted 3) Restart the server Foler structure for upcomming ==================================== 1) As of now we need 1)auth controller - for login and registration 2)Home controller - actually it is common landing page for all users 3)application Controller - for update status by officers 4)based on license we need create multiple forms and controller Form validations ================ 1) Note : field-error-label (should be added in class) , id ={input name}_label (based filed value) 2)
Note : id should be invalid-{input-name} 3) GCP_workflow ============ GCP_workflow table containes the workflow workflow - L&O ,IS ..etc order - 1,2,3,4, role_id - 1 so this order id based on workflow ex l&O workflow from GCP_workflow equal to l&O column in licence_details Note : this order number should be same in licences_details table So once the police login we need to get them workflow , in that workflow they may have two order ids , the main thing is workflow and department both are same, based on department_id they should update status in license_details table same time Zone based. Note : license id is important for every licence to get workflow workflow is important for police user to access the license in correct manner 1)license_workflow - for license 2)gcp_work_flow - for police 3)workflow tables is common for license_workflow and GCP_workflow 4) both license and user should have zone id to get license information with above criteria 4) license_details table should have all workflow column and zone_id column to get license by police Workflow set tables ================== 1)users 2)m_designaion 3)user_role_mapping 4)m_gcp_work_flow Credentials ------------- North ----- user id email password 2 liasstnorth@gmail.com 98745632 3 lisupnorth@gmail.com 4 lisaonorth@gmail.com 14 jcoastnorthasst@gmail.com 15 jcosupnorthasst@gmail.com 16 jcosaonorthasst@gmail.com 17 jcnorthasst@gmail.com 18 dcnorthasst@gmail.com 19 acnorthasst@gmail.com 20 shonorth@gmail.com 21 AddlCoP@gmail.com 22 dcadmin@gmail.com 23 addlcopproceeding@gmail.com 24 cop@gmail.com WEST ----- 5 liasstwest@gmail.com 8 lisupwest@gmail.com 13 lisaowest@gmail.com SOUTH ------- 6 liasstsouth@gmail.com 7 lisupsouth@gmail.com 12 lisaosouth@gmail.com EAST ------ 7 liassteast@gmail.com 10 lisupeast@gmail.com 11 lisaoeast@gmail.com End user / SAO .commisinor ---------------------------- 1) Applied 2) In progress / pending 3) clarification 4) Approved 5) Rejected 6) proceeding 7) Fresh 8) Renewal Optional ----------- 1) Notification Assistant /suprant ------------ 1)Fresh 2) Renewal 3) Inprogress /pending SAO ---- 1)Fresh 2) Renewal 3) Inprogress /pending 4) sent for clarification 5) Clarification from officer 6) for proceeeding index.php ========== require_once __DIR__."/../vendor/autoload.php"; $dotenv = Dotenv\Dotenv::createImmutable(dirname(__DIR__)); $dotenv->safeLoad(); use app\src\core\Application; use app\src\web\Route; $ds="mysql:host=localhost;port==3306;dbname=ppclhamy_gcp_new"; $user = "ppclhamy_gcp_new"; $password = "gcp_new@123"; $config =[ 'userClass' => \app\src\models\User::class, "db" => [ 'dsn' => $ds, 'user' => $user, 'password' => $password, ] ]; $app = new Application(dirname(__DIR__),$config); $route = new Route($app->router); $app->run(); Email.php ========== isSMTP(); $mail->Host = 'smtp.gmail.com'; $mail->SMTPAuth = true; $mail->Username = 'azhagammal7@gmail.com'; $mail->Password = 'xdpyimngsqyujksw'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('azhagammal7@gmail.com', 'Zaara Tech - GCP'); $mail->addAddress($email, ''); $mail->isHTML(true); $mail->Subject = 'Registration Confirmation'; $host = "gcp.ppc.lha.mybluehostin.me"; $mail->Body = '

Please click on the link to activate your account


'.$host.'/verify?em='.md5($email).''; if($mail->send()){ return true; }else{ return false; } } catch (Exception $e) { return false; } } } ?> ALTER TABLE licence_details MODIFY COLUMN created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP; ALTER TABLE license_notes MODIFY COLUMN created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP; ALTER TABLE license_report MODIFY COLUMN date TIMESTAMP DEFAULT CURRENT_TIMESTAMP; ALTER TABLE license_report MODIFY COLUMN time TIMESTAMP DEFAULT CURRENT_TIMESTAMP; New form --------- 1) Add route in view/layouts/main.php 2) Add route in web.php 3) create controller,model and view for new form 4) Modifify view,controller and model based on new form 5) Add license in license table 6) Update license workflow in m_license_workflow table 7) Update license workflow in gcp_workflow table if required 8) Need to add license header and column in headerInfo and columnInfo function in Home model 9) user edit page should be navigated to respective license page , for that we need to add page in getEditPage function in Home model 10 ) Add memo format for new licesne in master model memo preview 1) Add licence name in memoPreview function in Home model memo edit page 2) create new memo edit file in view folder and update it in getMemoPage function in Home model memo view page 3) update function in htmlContent() function in Home model