-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the alpha wiki!
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
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
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 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
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.
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