Skip to content

About

[READ-ONLY] Marko Framework - Application Skeleton. Issues and PRs at https://github.com/marko-php/marko

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

Marko Skeleton

Application skeleton for the Marko Framework.

Installation

composer create-project marko/skeleton my-app
cd my-app

What's Included

  • public/index.php — Web entry point
  • app/ — Your application modules
  • modules/ — Third-party modules
  • config/ — Root configuration
  • storage/ — Logs, cache, sessions
  • .env.example — Environment template

Getting Started

  1. Copy .env.example to .env
  2. Install dev tools: composer install
  3. Start the dev server: marko up
  4. Visit http://localhost:8000

The skeleton ships a working Pest test harness out of the box. tests/Pest.php binds Marko\Testing\TestCase as the base, which registers PSR-4 autoloaders for app/* and modules/* automatically. Run tests with:

composer test

Next Steps

Create a module inside app/ (for example app/foo/, with a composer.json that maps App\Foo\ to src/), then add a controller. Routes are declared with attributes:

<?php

declare(strict_types=1);

namespace App\Foo\Controller;

use Marko\Routing\Attributes\Get;
use Marko\Routing\Http\Response;

class HomeController
{
    #[Get('/')]
    public function index(): Response
    {
        return new Response(
            body: 'Hello, Marko!',
        );
    }
}

See Your First Application for the full walkthrough, including the module's composer.json.

Documentation

About

[READ-ONLY] Marko Framework - Application Skeleton. Issues and PRs at https://github.com/marko-php/marko

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages