Skip to content

Commit ee74008

Browse files
Initial commit
0 parents  commit ee74008

File tree

5 files changed

+84
-0
lines changed

5 files changed

+84
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
charset = utf-8
7+
end_of_line = crlf
8+
insert_final_newline = false
9+
trim_trailing_whitespace = true

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore Composer packages
2+
/vendor/
3+
composer.lock

composer.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "glowieframework/glowie-reactables",
3+
"description": "Glowie view components plugin",
4+
"license": "MIT",
5+
"homepage": "https://glowie.tk",
6+
"support": {
7+
"issues": "https://github.com/glowieframework/glowie-reactables/issues",
8+
"source": "https://github.com/glowieframework/glowie-reactables"
9+
},
10+
"authors": [
11+
{
12+
"name": "Gabriel Silva",
13+
"email": "[email protected]",
14+
"homepage": "https://glowie.tk"
15+
}
16+
],
17+
"require": {
18+
"glowieframework/glowie-core": "@dev"
19+
},
20+
"repositories": [
21+
{
22+
"type": "path",
23+
"url": "../glowie-core"
24+
}
25+
],
26+
"autoload": {
27+
"psr-4": {
28+
"Glowie\\Reactables\\": "src/"
29+
}
30+
},
31+
"minimum-stability": "dev",
32+
"prefer-stable": true
33+
}

src/Controllers/Component.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
namespace Glowie\Reactables\Controllers;
3+
4+
use Glowie\Core\Http\Controller;
5+
6+
class Component extends Controller{
7+
8+
public function component(){
9+
$this->renderView('reactables/test');
10+
}
11+
12+
}
13+
14+
?>

src/Reactables.php

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
namespace Glowie\Reactables;
3+
4+
use Glowie\Core\Plugin;
5+
use Glowie\Core\Http\Rails;
6+
use Glowie\Reactables\Controllers\Component;
7+
8+
class Reactables extends Plugin{
9+
10+
/**
11+
* Array of files to be published to the app folder.
12+
* @var array
13+
*/
14+
protected $files = [];
15+
16+
/**
17+
* Initializes the plugin.
18+
*/
19+
public function register(){
20+
Rails::addRoute('reactables', Component::class, 'component');
21+
}
22+
23+
}
24+
25+
?>

0 commit comments

Comments
 (0)