PHP code example of brewphp / skeleton

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

    

brewphp / skeleton example snippets


#[Register(Post::class)]
final class PostAdmin extends ModelAdmin
{
    public array $listDisplay = ['title', 'published_at'];
    public array $searchFields = ['title'];
}
bash
composer create-project brewphp/skeleton myapp
cd myapp
php manage.php serve
bash
composer install
cp .env.example .env
php manage.php key:generate
php manage.php migrate
bash
php manage.php createsuperuser

config/settings.php   settings (values from .env)
config/urls.php       root URLconf
apps/pages/           the sample "pages" app: views, urls, templates, tests
templates/            project-level templates: base.html layout, overrides of app templates
static/               project static files
media/                user uploads
storage/              cache, logs, sessions, compiled templates, SQLite database
public/index.php      front controller: point your web server here
manage.php            command-line entry point
bash
php manage.php makemigrations
php manage.php migrate