This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get('/v1/email_templates/:lang', UPLOAD_CONFIG.common, (req, res) => { | |
if (req.auth !== false) { | |
emailTemplate.getEmailTemplates(req, response => logSentResponse(req, res, response)); | |
} | |
}); | |
app.get('/v1/email_templates/:name/:lang', UPLOAD_CONFIG.common, (req, res) => { | |
if (req.auth !== false) { | |
emailTemplate.getEmailTemplate(req, response => logSentResponse(req, res, response)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Answer extends Model | |
{ | |
/** | |
* Get the question that owns the answer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Question extends Model | |
{ | |
/** | |
* Get the answers for the blog post. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Seeder; | |
class AnswersTableSeeder extends Seeder | |
{ | |
/** | |
* Run the database seeds. | |
* | |
* @return void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Seeder; | |
class QuestionsTableSeeder extends Seeder | |
{ | |
/** | |
* Run the database seeds. | |
* | |
* @return void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+------------+------------------+------+-----+---------+----------------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+------------+------------------+------+-----+---------+----------------+ | |
| id | int(10) unsigned | NO | PRI | NULL | auto_increment | | |
| title | varchar(255) | NO | | NULL | | | |
| body | mediumtext | NO | | NULL | | | |
| created_at | timestamp | YES | | NULL | | | |
| updated_at | timestamp | YES | | NULL | | | |
+------------+------------------+------+-----+---------+----------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateQuestionsAndAnswersTables extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\View\Helper; | |
use Cake\View\Helper; | |
class LinkHelper extends Helper | |
{ | |
public $helpers = ['Html']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
use App\Controller\AppController; | |
// Use Link Helper Class | |
use App\View\Helper\LinkHelper; | |
/** | |
* ProductCategories Controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>title</title> | |
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$('#sel div a').click(function(){ | |
console.log( this.rel ); |
NewerOlder