1. Go to this page and download the library: Download ruke318/phpcr library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Models;
use think\Model;
class Link extends Model
{
protected $table = 'links';
}
Link::find(4);
namespace App\Controllers;
use App\Models\Link;
use Lib\Request;
use think\Db;
class TestController
{
public function getIndex(Request $request, $id = null)
{
$info = LinK::find(26);
return success($info);
}
public function getTest(Request $request) {
$info = Db::table('links')->find(3);
return success($info);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.