PHPackages                             libxa/libxa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. libxa/libxa

ActiveProject

libxa/libxa
===========

libxaFrame Starter Application — Build something elite.

v0.0.1(1mo ago)01↓100%MITBladePHP ^8.3CI failing

Since Apr 9Pushed 1mo agoCompare

[ Source](https://github.com/libxa-framework/LibxaStack)[ Packagist](https://packagist.org/packages/libxa/libxa)[ RSS](/packages/libxa-libxa/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

LibxaFrame Starter Application
==============================

[](#libxaframe-starter-application)

Welcome to your new LibxaFrame application! This starter provides a clean, modern foundation for building web applications with PHP 8.3+.

About LibxaFrame
----------------

[](#about-libxaframe)

LibxaFrame is a modern, elegant, and lightning-fast PHP framework for the next generation of web applications. Built around developer happiness, performance, and scalability.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.3
- Composer
- Node.js &amp; NPM (for frontend assets)
- SQLite, MySQL, PostgreSQL, or SQL Server

Installation
------------

[](#installation)

### 1. Install Dependencies

[](#1-install-dependencies)

```
composer install
```

### 2. Environment Setup

[](#2-environment-setup)

Copy the example environment file and configure it:

```
cp .env.example .env
```

Generate an application key:

```
php libxa key:generate
```

### 3. Database Setup

[](#3-database-setup)

Configure your database in `.env`:

```
DB_CONNECTION=sqlite
# Or for MySQL:
# DB_CONNECTION=mysql
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=your_database
# DB_USERNAME=your_username
# DB_PASSWORD=your_password
```

Run migrations:

```
php libxa migrate
```

### 4. Frontend Assets

[](#4-frontend-assets)

Install and compile frontend assets:

```
npm install
npm run dev
```

For production:

```
npm run build
```

Quick Start
-----------

[](#quick-start)

Start the development server:

```
php libxa serve
```

Open your browser and visit `http://localhost:8000`

Project Structure
-----------------

[](#project-structure)

```
your-app/
├── src/
│   ├── app/              # Application code
│   │   ├── Http/         # Controllers, Middleware, Requests
│   │   ├── Models/       # Eloquent models
│   │   ├── Services/     # Business logic
│   │   └── Providers/    # Service providers
│   ├── config/           # Configuration files
│   ├── database/         # Database files
│   │   ├── migrations/   # Migration files
│   │   └── seeds/        # Seed files
│   ├── public/           # Public assets
│   ├── resources/        # Frontend assets (JS, CSS, Views)
│   │   ├── views/        # Blade templates
│   │   ├── js/          # JavaScript files
│   │   └── css/         # CSS files
│   ├── routes/           # Route definitions
│   │   ├── web.php      # Web routes
│   │   ├── api.php      # API routes
│   │   └── console.php  # Console routes
│   └── storage/          # Application storage
│       ├── app/         # Application generated files
│       ├── framework/   # Framework cache
│       └── logs/        # Log files
├── packages/            # Local packages
├── tests/               # Test files
├── composer.json        # PHP dependencies
├── package.json         # Node dependencies
└── libxa                # Framework CLI tool

```

Available Commands
------------------

[](#available-commands)

### Application

[](#application)

```
php libxa serve              # Start development server
php libxa key:generate       # Generate application key
php libxa env                # Display current environment
```

### Database

[](#database)

```
php libxa migrate             # Run database migrations
php libxa migrate:rollback    # Rollback last migration
php libxa migrate:refresh     # Rollback and re-run migrations
php libxa migrate:status      # Show migration status
php libxa db:seed             # Run database seeders
php libxa make:migration      # Create a new migration
php libxa make:model          # Create a new model
php libxa make:seeder         # Create a new seeder
```

### Code Generation

[](#code-generation)

```
php libxa make:controller     # Create a new controller
php libxa make:model          # Create a new model
php libxa make:migration      # Create a new migration
php libxa make:seeder         # Create a new seeder
php libxa make:request        # Create a form request
php libxa make:middleware     # Create a new middleware
php libxa make:command        # Create a new console command
php libxa make:provider       # Create a new service provider
php libxa make:event          # Create a new event
php libxa make:listener       # Create a new event listener
```

### Package Management

[](#package-management)

```
php libxa make:package        # Create a new package
php libxa package:discover    # Discover and register packages
php libxa vendor:publish      # Publish package assets
```

### Queue

[](#queue)

```
php libxa queue:work          # Process queue jobs
php libxa queue:listen        # Listen for queue jobs
php libxa queue:restart       # Restart queue workers
```

### Cache

[](#cache)

```
php libxa cache:clear         # Clear application cache
php libxa config:clear        # Clear configuration cache
php libxa route:clear         # Clear route cache
php libxa view:clear          # Clear view cache
```

### Testing

[](#testing)

```
php libxa test                # Run all tests
php libxa test --filter       # Run specific test
```

Routing
-------

[](#routing)

Routes are defined in `src/routes/web.php` for web routes and `src/routes/api.php` for API routes.

### Basic Route

[](#basic-route)

```
$router->get('/', function () {
    return view('welcome');
});
```

### Controller Route

[](#controller-route)

```
$router->get('/users', [UserController::class, 'index']);
```

### Route with Parameters

[](#route-with-parameters)

```
$router->get('/users/{id}', function ($id) {
    return "User {$id}";
});
```

### Route Groups

[](#route-groups)

```
$router->group(['prefix' => 'admin', 'middleware' => 'auth'], function ($router) {
    $router->get('/dashboard', [AdminController::class, 'dashboard']);
});
```

Controllers
-----------

[](#controllers)

Controllers are stored in `src/app/Http/Controllers/`.

```
