Skip to content

rath3r/rath3rapi

Repository files navigation

Rath3r API

This site is now active on data.rath3r.com it is a simple application focused on the presentation of data for a portfolio site.

The authentication is based on a Authentication tutorial using Slim 2 - PHP Authentication.

Installation

composer install

There after use.

composer update

Configuration

There is a .config file which is parsed for the connection details to the database. The file should look like:

[database]
dbname          = [dbname]
host            = [host]
username        = [username]
password        = [password]

registerActive  = true/false

The registerActive variable controls whether or not to activate the ability to register on the site.

Database

The database is accessed using the illuminate ORM. Illuminate currently at version 5.1-dev.

Templates

The templates are being generated by Twig.

Use auto_reload to reload the cache

// templates location and a settings array
$view = new \Slim\Views\Twig(
   '../templates', [
       'cache' => '../cache',
       'auto_reload' => true,
       'debug' => true
   ]
);

Image resize

The uploaded images are too big to be used effectively on other sites. Hopefully this plugin can help, Intervention/image with image resizing. The uploads folder needs to be writeable by the server for resizing to work.

Usage

After adding new file run:

composer dump-autoload

to regenerate the composer autoload facility. Clear instructions can be found here - Autoload composer

Test data

INSERT INTO `users` (`id`, `username`, `email`, `first_name`, `last_name`, `password`, `active`, `active_hash`, `recover_hash`, `remember_identifier`, `remember_token`, `created_at`, `updated_at`) VALUES
(13, 'test', 'test', 'test', 'test', '$2y$10$Jz67u9i96octcHAEM/7SLuGOQZrpmDmdqvGhvoxTCNPVcyoC6l6Ye', 0, NULL, NULL, NULL, NULL, '2015-12-02 22:38:01', '2015-12-02 22:38:01');

About

The datasource for rath3r.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published