anomalyce/laravel-entrypoint

Customise your Laravel entrypoint structure.

v1.0.2 2023-04-19 18:46 UTC

This package is auto-updated.

Last update: 2024-05-19 21:05:17 UTC


README

A flexible way of structuring your Laravel applications.

Defining the entrypoint

Create an entrypoint.php file at the root of your application.

$entrypoint = new Anomalyce\LaravelEntrypoint\Entrypoint(__DIR__);

$entrypoint->loadConfigurationFrom('config');
$entrypoint->loadLocaleFrom('locale');
$entrypoint->loadRoutesFrom('routes');
$entrypoint->loadStorageFrom('storage');
$entrypoint->loadDatabaseFrom('storage/database');
$entrypoint->storeBootstrapCacheIn('storage/bootstrap');
$entrypoint->serveFrom('public');

return $entrypoint;

Serving HTTP Applications

See stubs/http.stub for reference.

Serving Console Applications

See stubs/console.stub for reference.