Oleg K 2 years ago
parent
commit
60411bb86c
6 changed files with 47 additions and 6 deletions
  1. 1 1
      AutoloadExample.php
  2. 11 0
      Module.php
  3. 15 3
      README.md
  4. 2 2
      composer.json
  5. 15 0
      controllers/LinksController.php
  6. 3 0
      views/links/index.php

+ 1 - 1
AutoloadExample.php

@@ -1,6 +1,6 @@
 <?php
 
-namespace ptenchik0\referral;
+namespace reactlogic\referral;
 
 /**
  * This is just an example.

+ 11 - 0
Module.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace reactlogic\referral;
+
+use yii\base\Module as BaseModule;
+
+
+class Module extends BaseModule
+{
+
+}

+ 15 - 3
README.md

@@ -7,16 +7,28 @@ Installation
 
 The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
 
+Install
+-----
+1. Add to your composer.json
+```
+"repositories":[
+    {
+        "type": "git",
+        "url": "https://path.to/your/repo"
+    }
+]
+```
+
 Either run
 
 ```
-php composer.phar require --prefer-dist ptenchik0/yii2-referral "*"
+php composer.phar require --prefer-dist reactlogic/yii2-referral "*"
 ```
 
 or add
 
 ```
-"ptenchik0/yii2-referral": "*"
+"reactlogic/yii2-referral": "*"
 ```
 
 to the require section of your `composer.json` file.
@@ -28,4 +40,4 @@ Usage
 Once the extension is installed, simply use it in your code by  :
 
 ```php
-<?= \ptenchik0\referral\AutoloadExample::widget(); ?>```
+<?= \reactlogic\referral\AutoloadExample::widget(); ?>```

+ 2 - 2
composer.json

@@ -1,5 +1,5 @@
 {
-    "name": "ptenchik0/yii2-referral",
+    "name": "reactlogic/yii2-referral",
     "description": "Referral system desc",
     "type": "yii2-extension",
     "keywords": ["yii2","extension","referral"],
@@ -15,7 +15,7 @@
     },
     "autoload": {
         "psr-4": {
-            "ptenchik0\\referral\\": ""
+            "reactlogic\\referral\\": ""
         }
     }
 }

+ 15 - 0
controllers/LinksController.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace reactlogic\referral\controllers;
+
+use yii\web\Controller;
+
+class LinksController extends Controller
+{
+
+    public function actionIndex()
+    {
+        return $this->render('index', []);
+    }
+
+}

+ 3 - 0
views/links/index.php

@@ -0,0 +1,3 @@
+<div class="container">
+<?= "Hellow World!"; ?>
+</div>