1. Go to this page and download the library: Download yii2mod/yii2-link-preview 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/ */
$model = new LinkPreviewModel();
if ($model->load(Yii::$app->request->post()) && $model->validate()) {
$model->save();
}
// or the short version
$linkPreviewId = LinkPreviewModel::saveAndGetId(Yii::$app->request->post());
php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.