Download the PHP package phpdominicana/lightwave without Composer
On this page you can find all versions of the php package phpdominicana/lightwave. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phpdominicana/lightwave
More information about phpdominicana/lightwave
Files in phpdominicana/lightwave
Package lightwave
Short Description Simple php starter kit
License MIT
Homepage https://github.com/PHP-Dominicana/lightwave
Informations about the package lightwave
Lightwave
This is a simple PHP starter kit created by the PHP dominicana community. It is designed to help you get started with PHP development quickly. It includes a simple web server, a simple router It is designed to be simple and easy to use.
Installation
A few simple steps are needed to get this application up and running:
The next step assumes that composer is available in your PATH
Copy the .env.example file to .env and update the database connection settings.
Usage with PHP native server
To start the PHP native server, run the following command:
Add new routes
Routes are defined in the routes/web.php
file. This file is loaded by the RouteServiceProvider
.
To define routes, you can use the $router
object, which is an instance of Phpdominicana\Lightwave\Router
. It provides simple methods for common HTTP verbs:
Controller Structure and Dependency Injection
Controller methods referenced in your routes can receive dependencies in two main ways:
-
Route Parameters: Any parameters defined in your route path (e.g.,
{name}
in/hello/{name}
) will be passed to your controller method as arguments with matching names. - Service Container: If your controller method type-hints
Pimple\Psr11\Container
(or its interfacePsr\Container\ContainerInterface
), the application's service container will be injected. You can use this to resolve other services, like the view renderer.
How to connect to a database using eloquent ORM
Install eloquent ORM
Add the EloquenServiceProvider to the src/Providers/AppServiceProvider
class to the config/app.php file in the providers
array.
Then you can create you model and extend the Illuminate\Database\Eloquent\Model
class.
All versions of lightwave with dependencies
pimple/pimple Version ^3.5
symfony/routing Version ^7.1
symfony/http-foundation Version ^7.1
twig/twig Version ^3.10
illuminate/support Version ^11.11
phpoption/phpoption Version ^1.9
vlucas/phpdotenv Version ^5.6