I am presently growing an SaaS software in PHP, with Laravel, utilizing its personal DB class.
Let’s faux we have got 2 lessons beneath 2 namespaces, plus Laravel’s personal DB – so
IlluminateSupportFacadesDB;
DeveloperAppCoreQueries;
DeveloperAppSection;
They’re our three lessons.
With our customized lessons, we have got
File 1: DeveloperAppCoreQueriesSection.php
which incorporates
personal perform fetchInfoFromTable(string $id)
{
//Fake there's a bit to examine if we have already run the question
return DB::Question('blablabla');
}
File 2: DeveloperAppSectionXXXXX.php
personal perform showInfo()
{
$information = Part::fetchInfoFromTable(1);
$information = dostufftomakeitnice($information);
$information = doMorestufftomakeitnice($information);
return $information;
}
Is that this well worth the quantity of effort I’ve put into typing this query? Or is it price simply placing even the queries into XXXXX.php
?