PHPackages                             osmphp/admin - 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. [Admin Panels](/categories/admin)
4. /
5. osmphp/admin

AbandonedArchivedLibrary[Admin Panels](/categories/admin)

osmphp/admin
============

A package for defining data structures using PHP 8 classes and attributes, and getting fully functioning Admin Panel and API.

v0.2.3(3y ago)528[1 issues](https://github.com/osmphp/admin/issues)1GPL-3.0-onlyPHPPHP &gt;=8.1

Since Nov 5Pushed 3y ago3 watchersCompare

[ Source](https://github.com/osmphp/admin)[ Packagist](https://packagist.org/packages/osmphp/admin)[ RSS](/packages/osmphp-admin/feed)WikiDiscussions v0.3 Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (13)Used By (1)

Osm Admin is a framework for defining database tables using PHP classes and having a user-friendly admin panel for managing data out of the box.

The ultimate goal to is for you to stop worrying about all the admin panel details of your application, and spend all your efforts on what actually matter to *your* users.

Currently, it's in active development. The rest of the document is written in present tense, but most of it is yet to be implemented.

Prerequisites
-------------

[](#prerequisites)

- [PHP 8.1 or later](https://www.php.net/manual/en/install.php), and enable `curl`, `fileinfo`, `intl`, `mbstring`, `openssl`, `pdo_mysql`, `pdo_sqlite`, `sqlite3`extensions
- [MySql 8.0 or later](https://dev.mysql.com/downloads/)
- [Node.js, the latest LTS version](https://nodejs.org/en/download/current/)
- [Gulp 4 command line utility](https://gulpjs.com/docs/en/getting-started/quick-start#install-the-gulp-command-line-utility)
- [ElasticSearch 7.14 or later](https://www.elastic.co/downloads/elasticsearch)
- [Osm Framework command line aliases](https://osm.software/blog/21/08/framework-command-line-aliases.html)

Getting Started
---------------

[](#getting-started)

1. Create a project:

    ```
     composer create-project osmphp/admin-project project1

    ```
2. Create MySql database, for example `project1`. Avoid `_` and `-` symbols in the name.
3. In the project directory, create `.env.Osm_App` file. On Linux, use `bin/create-env.sh` command to create it from a template:

    ```
     NAME=... # same as MySql database name
     #PRODUCTION=true

     MYSQL_DATABASE="${NAME}"
     MYSQL_USERNAME=...
     MYSQL_PASSWORD=...

     SEARCH_INDEX_PREFIX="${NAME}_"

    ```
4. Install the project. On Linux, run `bin/install.sh` in the project directory. On other platforms, run the following commands:

    ```
     # go to project directory
     cd project1

     # compile the applications
     osmc Osm_Admin_Samples
     osmc Osm_Project
     osmc Osm_Tools

     # collect JS dependencies from all installed modules
     osmt config:npm

     # install JS dependencies
     npm install

     # build JS, CSS and other assets
     gulp

     # make `temp` directory writable
     find temp -type d -exec chmod 777 {} \;
     find temp -type f -exec chmod 666 {} \;

     # create tables in the MySql database
     osm migrate:up --fresh

    ```
5. Create and enable a [Nginx virtual host](https://osm.software/docs/framework/0.15/getting-started/web-server.html#nginx), for example, `project1.local`.

    ```
    osmt config:nginx --prevent_network_access
    sudo php vendor/osmphp/framework/bin/tools.php config:host
    sudo php vendor/osmphp/framework/bin/tools.php install:nginx

    ```
6. In a separate command line window, keep Gulp running, it will clear the cache and rebuild assets as needed:

    ```
      cd project1
      gulp && gulp watch

    ```
7. Define a data class:

    ```
     # src/Welcome/Product.php
