1. Go to this page and download the library: Download lanos/laravel-property-data 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/ */
use PropertyData;
// Get property valuation
$valuation = PropertyData::valuationSale('SW1A 1AA', beds: 3, sqft: 1200);
// Get area demographics
$demographics = PropertyData::demographics(postcode: 'SW1A 1AA');
// Check planning applications
$planning = PropertyData::planningApplications(postcode: 'SW1A 1AA');
use Lanos\LaravelPropertyData\LaravelPropertyData;
class PropertyController extends Controller
{
public function __construct(
private LaravelPropertyData $propertyData
) {}
public function show(string $postcode)
{
$data = $this->propertyData->prices($postcode);
return view('property.show', compact('data'));
}
}
// Match address to UPRN
$uprns = PropertyData::addressMatchUprn('123 Example Street, London, SW1A 1AA');
// Lookup property by UPRN
$property = PropertyData::uprn('123456789012');
// Lookup multiple UPRNs
$properties = PropertyData::uprns(['123456789012', '123456789013']);
// Get Land Registry title for UPRN
$title = PropertyData::uprnTitle('123456789012');
use Lanos\LaravelPropertyData\Enums\DecisionRating;
// Planning applications
$planning = PropertyData::planningApplications(
postcode: 'SW1A 1AA',
decisionRating: DecisionRating::POSITIVE,
category: 'residential',
maxAge: 365
);
// Check if in Area of Outstanding Natural Beauty
$aonb = PropertyData::aonb(postcode: 'SW1A 1AA');
// Check if in conservation area
$conservation = PropertyData::conservationArea(postcode: 'SW1A 1AA');
// Check if in green belt
$greenBelt = PropertyData::greenBelt(postcode: 'SW1A 1AA');
// Check if in national park
$nationalPark = PropertyData::nationalPark(postcode: 'SW1A 1AA');
// Get listed buildings
$listedBuildings = PropertyData::listedBuildings('SW1A 1AA');
// Area type classification (rural/urban)
$areaType = PropertyData::areaType('SW1A 1AA');
// Council tax information
$councilTax = PropertyData::councilTax(postcode: 'SW1A 1AA');
// Crime statistics
$crime = PropertyData::crime(postcode: 'SW1A 1AA');
// Demographics
$demographics = PropertyData::demographics(postcode: 'SW1A 1AA');
// Flood risk
$floodRisk = PropertyData::floodRisk(postcode: 'SW1A 1AA');
// Household income
$income = PropertyData::householdIncome('SW1A 1AA');
// Internet speed
$internetSpeed = PropertyData::internetSpeed('SW1A 1AA');
// Local Housing Allowance rate
$lhaRate = PropertyData::lhaRate('SW1A 1AA');
// Population statistics
$population = PropertyData::population('SW1A 1AA');
// Political representation
$politics = PropertyData::politics('SW1A 1AA');
// PTAL score (London only)
$ptal = PropertyData::ptal('SW1A 1AA');
// Key statistics by postcode
$keyStats = PropertyData::postcodeKeyStats('SW1A 1AA');
// Get API credits information
$credits = PropertyData::accountCredits();
// Get account documents
$documents = PropertyData::accountDocuments(page: 1, perPage: 20);
// Test API connection
$isConnected = PropertyData::testConnection();
use PropertyData;
use Lanos\LaravelPropertyData\Enums\ProjectType;
use Lanos\LaravelPropertyData\Enums\FinishQuality;
class PropertyInvestmentService
{
public function analyzeInvestment(string $postcode, float $purchasePrice)
{
// Get current market data
$prices = PropertyData::prices($postcode);
$yields = PropertyData::yields($postcode);
$demand = PropertyData::demand(postcode: $postcode);
// Get area information
$crime = PropertyData::crime(postcode: $postcode);
$schools = PropertyData::schools(postcode: $postcode);
$demographics = PropertyData::demographics(postcode: $postcode);
// Calculate development potential
$feasibility = PropertyData::developmentCalculator(
postcode: $postcode,
purchasePrice: $purchasePrice,
sqftPreDevelopment: 1000,
sqftPostDevelopment: 1400,
projectType: ProjectType::REFURBISH,
finishQuality: FinishQuality::MEDIUM
);
return [
'market' => [
'prices' => $prices,
'yields' => $yields,
'demand' => $demand,
],
'area' => [
'crime' => $crime,
'schools' => $schools,
'demographics' => $demographics,
],
'development' => $feasibility,
];
}
}