forked from projects/fipamo
reorganized services
service classes are beginning to swell as there functionality is being fleshed out, so a new organizational structure was needed to make sure class sizes don't become too large and to increase site managability and legibilty as more features get added and the code base grows. data is for retrieving, managing site information, assets interact with external files and upkeep is for maintenance. some additional tweaks were also made to the options menu template to prep it for it's transition to a toolbar component
This commit is contained in:
parent
a2053df931
commit
36d04c8f68
20 changed files with 56 additions and 43 deletions
|
@ -3,7 +3,7 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use App\Services\AuthService;
|
||||
use App\Services\Data\AuthService;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AuthController extends Controller
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Interfaces\PageRepositoryInterface;
|
||||
use App\Services\AuthService;
|
||||
use App\Services\ThemeService;
|
||||
use App\Services\SortingService;
|
||||
use App\Services\Data\AuthService;
|
||||
use App\Services\Data\ThemeService;
|
||||
use App\Services\Data\SortingService;
|
||||
|
||||
class DashController extends Controller
|
||||
{
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\SettingsService;
|
||||
use App\Services\AuthService;
|
||||
use App\Interfaces\PageRepositoryInterface;
|
||||
use App\Services\SortingService;
|
||||
use App\Services\AssetService;
|
||||
use App\Services\Assets\AssetService;
|
||||
use App\Services\Data\SettingsService;
|
||||
use App\Services\Data\AuthService;
|
||||
use App\Services\Data\SortingService;
|
||||
|
||||
use function _\find;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\AuthService;
|
||||
use App\Services\Data\AuthService;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class RouteController extends Controller
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Interfaces\PageRepositoryInterface;
|
||||
use App\Services\AuthService;
|
||||
use App\Services\SortingService;
|
||||
use App\Services\AssetService;
|
||||
use App\Services\ThemeService;
|
||||
use App\Services\Assets\AssetService;
|
||||
use App\Services\Data\AuthService;
|
||||
use App\Services\Data\SortingService;
|
||||
use App\Services\Data\ThemeService;
|
||||
|
||||
class ThemeController extends Controller
|
||||
{
|
||||
|
|
|
@ -3,20 +3,24 @@
|
|||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
//Repos
|
||||
use App\Repositories\PageRepository;
|
||||
use App\Interfaces\PageRepositoryInterface;
|
||||
use App\Services\SettingsService;
|
||||
use App\Services\AuthService;
|
||||
use App\Services\ContentService;
|
||||
use App\Services\PaginateService;
|
||||
use App\Services\ThemeService;
|
||||
use App\Services\DocService;
|
||||
use App\Services\FileUploadService;
|
||||
use App\Services\RenderService;
|
||||
use App\Services\SortingService;
|
||||
use App\Services\AssetService;
|
||||
use App\Services\MaintenanceService;
|
||||
use App\Services\InitService;
|
||||
//Asset Services
|
||||
use App\Services\Assets\AssetService;
|
||||
use App\Services\Assets\DocService;
|
||||
use App\Services\Assets\FileUploadService;
|
||||
use App\Services\Assets\RenderService;
|
||||
//Data Services
|
||||
use App\Services\Data\SettingsService;
|
||||
use App\Services\Data\AuthService;
|
||||
use App\Services\Data\ContentService;
|
||||
use App\Services\Data\PaginateService;
|
||||
use App\Services\Data\ThemeService;
|
||||
use App\Services\Data\SortingService;
|
||||
//Upkeep Services
|
||||
use App\Services\UpKeep\MaintenanceService;
|
||||
use App\Services\UpKeep\InitService;
|
||||
|
||||
class FipamoServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
namespace App\Repositories;
|
||||
|
||||
use App\Interfaces\PageRepositoryInterface;
|
||||
use App\Services\SettingsService;
|
||||
use App\Services\ContentService;
|
||||
use App\Services\PaginateService;
|
||||
use App\Services\DocService;
|
||||
use App\Services\SortingService;
|
||||
use App\Services\RenderService;
|
||||
//Asset Services
|
||||
use App\Services\Assets\DocService;
|
||||
use App\Services\Assets\RenderService;
|
||||
//Data Services
|
||||
use App\Services\Data\SettingsService;
|
||||
use App\Services\Data\ContentService;
|
||||
use App\Services\Data\PaginateService;
|
||||
use App\Services\Data\SortingService;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class PageRepository implements PageRepositoryInterface
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
namespace App\Services\Assets;
|
||||
|
||||
use App\Services\Data\ThemeService;
|
||||
|
||||
class AssetService
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
namespace App\Services\Assets;
|
||||
|
||||
class DocService
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
namespace App\Services\Assets;
|
||||
|
||||
class FileUploadService
|
||||
{
|
|
@ -1,8 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
namespace App\Services\Assets;
|
||||
|
||||
use Illuminate\Support\Facades\File;
|
||||
use App\Services\Data\SortingService;
|
||||
use App\Services\Data\SettingsService;
|
||||
use App\Services\Data\ContentService;
|
||||
|
||||
class RenderService
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
namespace App\Services\Data;
|
||||
|
||||
use ReallySimpleJWT\Token;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
namespace App\Services\Data;
|
||||
|
||||
use HtmlSanitizer\SanitizerBuilder;
|
||||
use League\CommonMark\MarkdownConverter;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
namespace App\Services\Data;
|
||||
|
||||
use function _\filter;
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
namespace App\Services\Data;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use App\Services\Assets\DocService;
|
||||
|
||||
use function _\find;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
namespace App\Services\Data;
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
namespace App\Services\Data;
|
||||
|
||||
class ThemeService
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
namespace App\Services\Upkeep;
|
||||
|
||||
use ReallySimpleJWT\Token;
|
||||
use ReallySimpleJWT\Exception\BuildException;
|
|
@ -31,7 +31,7 @@ if(isset($page['uuid']))
|
|||
|
||||
@endphp
|
||||
|
||||
<br>
|
||||
<div role="toolbar" aria-label="page options" aria-orientation="horizontal">
|
||||
<button id="option-menu-pin" class="option-inactive post-option-btn" data-active="{{ $menu }}" title='Pin to Menu' aria-label="pin to menu">
|
||||
<svg id="option-menu-pin" class="icon">
|
||||
<use id="option-menu-pin" xlink:href="/assets/images/global/sprite.svg#entypo-pin"/>
|
||||
|
@ -50,3 +50,4 @@ if(isset($page['uuid']))
|
|||
</svg>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue