forked from projects/fipamo
added helper function scaffolding
some serivce classes are getting to heavy, so some functionality will be offloaded to custom helper function for better manageability and readability. a couple of place holders have been added to demonstrate how helpers will be organized
This commit is contained in:
parent
fe36bae01e
commit
65220fe06a
4 changed files with 39 additions and 0 deletions
6
app/Helpers/PageSorter.php
Normal file
6
app/Helpers/PageSorter.php
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
|
||||
function sorter()
|
||||
{
|
||||
echo("BITCH WE ARE SORTING");
|
||||
}
|
6
app/Helpers/StringHelpers.php
Normal file
6
app/Helpers/StringHelpers.php
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
|
||||
function tester()
|
||||
{
|
||||
echo("IT WORKS");
|
||||
}
|
26
app/Providers/FipamoHelperProvider.php
Normal file
26
app/Providers/FipamoHelperProvider.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class FipamoHelperProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
foreach (glob(app_path() . '/Helpers/*.php') as $filename) {
|
||||
require_once $filename;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
|
@ -169,6 +169,7 @@ return [
|
|||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
App\Providers\FipamoServiceProvider::class,
|
||||
App\Providers\FipamoHelperProvider::class,
|
||||
])->toArray(),
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue