Skip to content

Commit

Permalink
feat: Fix formbuilder (#12)
Browse files Browse the repository at this point in the history
* feat: packaged cmseditor (#2)

* feat: composer file

* feat: add license + changelog

* Add files via upload

* Delete CmsEditor directory

* Delete resources/views directory

---------

Co-authored-by: Rene <rene@notfound.nl>
Co-authored-by: Xander Schuurman <44030544+keeama13@users.noreply.github.com>

* feat: migrations + routes + restructure (#3)

* feat: migrations + routes + restructure

* fix: added composer + removed cmseditor folder

* fix: providers

* feat: models in package (#4)

* feat: models in package

* feat: packaged controllers

* feat: seeders in package

* fix: removed test echo

* feat: lang + views

* feat: services + provides

* feat: package

* feat: finalizing package

* feat: last changes

* fix: remove surplus migrations

* feat: database seeders

* feat: add helpers

* fix: policy namespacing

* fix: class name

* fix: remove user provider

* feat: last configs

---------

Co-authored-by: Rene <rene@notfound.nl>

* fix: syntax error in composer file

* style: formatting

* feat: add pinter

* fix!: database prefix (#6)

* feat: Events (#7)

* feat: models in package

* feat: packaged controllers

* feat: seeders in package

* fix: removed test echo

* feat: lang + views

* feat: services + provides

* feat: package

* feat: finalizing package

* feat: last changes

* fix: remove surplus migrations

* feat: database seeders

* feat: add helpers

* fix: policy namespacing

* fix: class name

* fix: remove user provider

* feat: last configs

* feat: events

* feat: events namespace

* fix: namespace errors

* style: formatting

* fix: composer syntax error

---------

Co-authored-by: keeama13 <xander@schuurmannen.nl>
Co-authored-by: Rene <rene@notfound.nl>

* fix: forms

* feat: namespace changes (#9)

* feat: namespace changes

* feat: namespacing

* feat: working views

* fix: remove duplicate entries

* fix: remove SiteBoss namspace

* style: formatting

---------

Co-authored-by: René <github@registraties.notfound.nl>
Co-authored-by: Rene <rene@notfound.nl>

* fix: removed laravel assets from publish (#10)

* fix: class path name

* fix!: formbuilder problem quickfix

* style: formatting

---------

Co-authored-by: Rene <rene@notfound.nl>
Co-authored-by: Xander Schuurman <44030544+keeama13@users.noreply.github.com>
Co-authored-by: keeama13 <xander@schuurmannen.nl>
  • Loading branch information
4 people authored Jun 7, 2023
1 parent c5ad599 commit 6c69173
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/FrameworkServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
use Notfound\Framework\View\Components\Forms\Form;
use NotFound\Framework\View\Components\Forms\Form;

class FrameworkServiceProvider extends ServiceProvider
{
Expand All @@ -27,10 +27,6 @@ public function boot(): void
__DIR__.'/Providers/AuthServiceProvider.php' => app_path('Providers/AuthServiceProvider.php'),
__DIR__.'/../database/seeders/DatabaseSeeder.php' => database_path('seeders/DatabaseSeeder.php'),
], 'siteboss-framework');

Blade::component('formbuilder-form', Form::class);
Blade::componentNamespace('NotFound\\Framework\\View\\Components\\Forms\\Fields', 'fields');

}

public function register(): void
Expand Down
5 changes: 5 additions & 0 deletions src/Services/Forms/Fields/FactoryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ function customclassPath(string $className): string
spl_autoload_register(function ($className) {
$defaultFieldsPath = app_path().'/Services/Forms/Fields/';

// TODO: BUG: This is not working
// Quick fix for now, but we need to understand what this does
// and preferably have it adhere to PSR-4.
$sitebossFieldsPath = app_path().'app/Services/Forms/Fields/';

if (startsWithAndStrip($className, 'NotFound\\Framework\\Services\\Forms\\Fields\\') || startsWithAndStrip($className, 'App\\Services\\Forms\\Fields\\')) {
// Check if siteboss has a field type
$completeClassName = $sitebossFieldsPath.customclassPath($className);
Expand Down

0 comments on commit 6c69173

Please sign in to comment.