Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
l.a edited this page Apr 26, 2019 · 10 revisions

Welcome to the alpha wiki!

Getting started

Database configuration

For database configuration, you can choose to do that app/lib/Database.php or you can do the settings in your app/config/config.ini

CSS and JS

Run npm install in public to install all development dependencies. By default this framework doesn't use any css framework but has semantic UI and MaterializeCss as options you can choose. Of course, you could change it to suit your need. Run gulp in public/ directory to be able to make changes to css and js app files in public/assets/src.

Update: You can run php alpha init to install composer packages and node packages. You can run php alpha gulp to run gulp

Controllers

Controller naming follow an pattern, controller name like events with Controller appended to it giving eventsController.php. Controllers must be plural but of course, it's all dependent on you. To create a controller, you can run php alpha g controller path/to/controller/Name. E.g php alpha g controller Events or php alpah g controller events/Index.

Models

Models and Controllers cannot have the same class name. Models are usually singular. To create a model, you can run php alpha g:model ModelName. Models use eloquent, so you might probably want to checkout the Eloquent ORM documentation

Views

The index controller has an example of how views are rendered. If you are passing data to a JS file in the views, I'd suggest you create a js directory in the controller view directory and put your JS file there. This applies to Partials as well, just to keep your code organization as clean as possible.

Starting the App

Simply navigate to the root directory of the app and type php -S localhost:your_preferred_port or you can run php alpha serve. This starts the application on port 7500. To use preferred post, run php alpha serve -p your_preffered_port

Clone this wiki locally