PHP code example of smmahfujurrahman / projectplangenerator

1. Go to this page and download the library: Download smmahfujurrahman/projectplangenerator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

smmahfujurrahman / projectplangenerator example snippets


return [
    // Enable/disable the entire package
    'enabled' => env('PROJECT_PLANNER_ENABLED', true),

    // Route configuration
    'route' => [
        'enabled' => env('PROJECT_PLANNER_ROUTE_ENABLED', true),
        'prefix' => env('PROJECT_PLANNER_PREFIX', 'project-planner'),
        'middleware' => ['web'], // Add 'auth' for authentication
    ],

    // Web path for assets
    'web_path' => env('PROJECT_PLANNER_WEB_PATH', '/project-planner'),

    // Import/Export settings
    'import_export' => [
        'pdf' => [
            'enabled' => true,
            'download' => true,
            'upload' => true,
        ],
    ],

    // Feature flags - control what users can do
    'features' => [
        'create_project' => true,
        'edit_project' => true,
        'delete_project' => true,
        'export_pdf' => true,
        'import_data' => true,
        'statistics' => true,
        'charts' => true,
    ],
];

// User clicks "Export PDF" button in the UI
// Downloads: ProjectName_Report.pdf (professional formatted report)
// Contains: 
// - Cover Page with project overview
// - Executive Summary with timeline, budget, team
// - Complete module breakdown with progress bars
// - Statistics and completion metrics

// User clicks "Import PDF" button
// Uploads PDF file
// Parses and creates a new project with all modules and sub-modules
// Syncs with existing localStorage data
// Preserves all project details, timelines, and status

// Access: /project-planner/pdf-preview
// Live preview of PDF without downloading
// Useful for testing PDF generation and layout
// See changes in real-time as you modify projects

'route' => [
    'middleware' => ['web', 'auth'], // Require login
],

'features' => [
    'create_project' => false, // Disable project creation
    'delete_project' => false, // Disable project deletion
    'import_data' => false,    // Disable PDF import
],

'route' => [
    'prefix' => 'my-projects', // Access at /my-projects
],

'ui' => [
    'app_name' => 'My Company Project Tracker',
],
bash
php artisan projectplanner:publish
bash
php artisan projectplanner:publish --force
bash
# Publish only configuration
php artisan vendor:publish --tag=projectplanner-config

# Publish only assets (CSS, JS)
php artisan vendor:publish --tag=projectplanner-assets

# Publish everything
php artisan vendor:publish --provider="SMMahfujurRahman\ProjectPlanGenerator\ProjectPlanGeneratorServiceProvider"
bash
# Publish all package files at once (recommended)
php artisan projectplanner:publish

# Publish with force (overwrite existing files)
php artisan projectplanner:publish --force

# Individual publishing (optional)
php artisan vendor:publish --tag=projectplanner-config
php artisan vendor:publish --tag=projectplanner-assets

# To override index.blade.php:
resources/views/vendor/projectplanner/index.blade.php

# To override pdf-preview.blade.php:
resources/views/vendor/projectplanner/pdf-preview.blade.php