PHP code example of sadegh-pm / slim-skeleton

1. Go to this page and download the library: Download sadegh-pm/slim-skeleton 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/ */

    

sadegh-pm / slim-skeleton example snippets


    public function testSaveFileOnStorage()
    {
        /** @var Filesystem $storage */
        $storage = dependency(Filesystem::class);
        $testFile = "test_file.txt";
        $content = uniqid('random_text');
        $creationStat = $storage->put($testFile, $content);
        $this->assertTrue($creationStat);
        $this->assertTrue($storage->get($testFile)->exists());
        $this->assertEquals($content, $storage->read($testFile));
        $this->assertTrue($storage->delete($testFile));
    }
 bash
// Skeleton Command
$ php cli serve

// Composer Command
$ composer start
 bash
$value = config('app.timezone');
 bash
$ php cli storage:link