PHP code example of kaqazstudio / laravel-interlink
1. Go to this page and download the library: Download kaqazstudio/laravel-interlink 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/ */
LaravelInterlink::single()
->init() // Warm engine
->setKeyword('AirPods') // Target Keyword
->setLink('/apple-airpods') // Target url
->setCount(1) // For first word
->setPosts(BlogPost::all()) // Get all blog posts
->setColumn('body') // Set `body` column for content target
->process() // Process internalization
->updatePosts(); // Run update on posts!
LaravelInterlink::single()
...
->setLink('<a href="own.com">Custom-Link</a>') // Your custom format
->rawLink() // Raw link format [+]
...
LaravelInterlink::single()
...
->setCustomAttributes('custom-data="Hello"') // Raw link format [+]
...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.