Skip to content

Commit

Permalink
feat: version 0.1.1 (#8)
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 <[email protected]>
Co-authored-by: Xander Schuurman <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Rene <[email protected]>

---------

Co-authored-by: Rene <[email protected]>
Co-authored-by: Xander Schuurman <[email protected]>
Co-authored-by: keeama13 <[email protected]>
  • Loading branch information
4 people authored Jun 6, 2023
1 parent 23fd841 commit 5b8e891
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 5 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/pint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: PHP Linting
on: pull_request
jobs:
phplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "laravel-pint"
uses: aglipanci/[email protected]
with:
preset: laravel
pintVersion: 1.8.0
verboseMode: true
testMode: true
# configPath: "vendor/my-company/coding-style/pint.json"
2 changes: 1 addition & 1 deletion config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => env('DB_DATABASE_PREFIX', ''),
'prefix' => env('DB_PREFIX', ''),
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
Expand Down
25 changes: 25 additions & 0 deletions src/Events/AfterSaveEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace NotFound\Framework\Events;

use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use NotFound\Framework\Models\BaseModel;

class AfterSaveEvent
{
use Dispatchable, SerializesModels;

private BaseModel $model;

/**
* Create a new event instance.
*
* @param $model is an model of Table or Strings that they extends from BaseModel
* @return void
*/
public function __construct(BaseModel $model)
{
$this->model = $model;
}
}
25 changes: 25 additions & 0 deletions src/Events/BeforeSaveEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace NotFound\Framework\Events;

use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use NotFound\Framework\Models\BaseModel;

class BeforeSaveEvent
{
use Dispatchable, SerializesModels;

private BaseModel $model;

/**
* Create a new event instance.
*
* @param $model is an model of Table or Strings that they implements IAsset
* @return void
*/
public function __construct(BaseModel $model)
{
$this->model = $model;
}
}
4 changes: 2 additions & 2 deletions src/Http/Controllers/Assets/TableEditorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace NotFound\Framework\Http\Controllers\Assets;

use App\Events\AfterSaveEvent;
use App\Events\BeforeSaveEvent;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
use NotFound\Framework\Events\AfterSaveEvent;
use NotFound\Framework\Events\BeforeSaveEvent;
use NotFound\Framework\Http\Requests\FormDataRequest;
use NotFound\Framework\Models\Lang;
use NotFound\Framework\Models\Table;
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Forms/Fields/FactoryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function customclassPath(string $className): string
spl_autoload_register(function ($className) {
$defaultFieldsPath = app_path().'/Services/Forms/Fields/';

if (startsWithAndStrip($className, 'App\\Services\\Forms\\Fields\\') || startsWithAndStrip($className, 'Siteboss\\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);
if (file_exists($completeClassName)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Indexer/IndexBuilderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private function updatePage($menu, $lang)
private function updateSubPages($menu, $lang)
{
$class = $menu->template->filename ?? '';
$className = 'Siteboss\NotFound\Framework\Http\Controllers\Page\\'.$class.'Controller';
$className = 'App\Http\Controllers\Page\\'.$class.'Controller';
$c = null;

// update subPage if necessary
Expand Down

0 comments on commit 5b8e891

Please sign in to comment.