SkillAgentSearch skills...

Luna

A small and super simple PHP framework

Install / Use

/learn @Alewex/Luna
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Luna

A small and super simple PHP framework

I know there are tons of frameworks (specially micro) out there that have better functionality and are way faster, this one is not intended to be innovative or any different from the others, this one is just the product of my free time and curiosity to see if I could craft a basic yet functional framework with my achieved skills so far.

Feedback is more than appreciated.

Usage

Adding a route to the collection

// GET route.
$app->get('/home', function(
{
  echo "Welcome to Luna!";
});
// POST route.
$app->post('/create', function(
{
  echo "Hey there! This is a POST route.";
});
// Multi-route.
$app->post(['/', '/home'], function(
{
  echo "Welcome! You can see this with either '/' or '/home'";
});

Controller or View as a route response

// Controller
$app->get('/about', ['controller' => 'AboutController']);

// View
$app->get('/about', ['view' => ['view' => 'About', 'title' => 'About', 'data' => ['email' => 'me@example.com']]]);
View on GitHub
GitHub Stars8
CategoryDevelopment
Updated7y ago
Forks0

Languages

PHP

Security Score

55/100

Audited on Nov 15, 2018

No findings