fc/ntcode

Installs: 12

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

1.4.0 2018-05-22 21:45 UTC

This package is not auto-updated.

Last update: 2024-09-20 04:16:01 UTC


README

framework

  1. laravel 5.4+

install

  1. composer require fc/ntcode

init

php artisan vendor:publish

demo controller

<?php

//.........

use fc\ntcode\Ntcode as LLLntcode;


class TestController extends BaseController
{
    
    
    
    public function index(){

        $aTpl = array();
        
        $aTpl['TPL'] = array();
        
        
        return View::make("test" , $aTpl );
    }
    
    
    public function make(){
        echo LLLntcode::make();
    }
    
    public function check(){
        echo LLLntcode::check();
        exit();
    }
    
}

demo view

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>test</title>
  

@include('ntcode::header')

</head>

<body>

  



<div class="tncode" ></div>

<script type="text/javascript">
$TN.setUrl("img", "{!! URL::route('test.make', [] ) !!}");
$TN.setUrl("check" , "{!! URL::route('test.check', [] ) !!}");
$TN.onsuccess(function(){
    alert("ok");
});
</script>



</body>

</html>