Skip to content

Commit

Permalink
Overhaul (#21)
Browse files Browse the repository at this point in the history
* Cleanup old-structures

* Package Setup and Testbench

* Adjust Setup

* Finish setup SPA Admin, WIP Back-end

* Added facade and adjust composer.json

* WIP Layouting

* WIP Displaying Blog Data

* Adjust the naming

* WIP

* WIP

* Reusable Functionality and CRUD Tags Done

* WIP Post

* WIP editor

* Finish Post Crud

* WIP

* Fix vite config for admin asset
  • Loading branch information
antoniputra authored Apr 29, 2024
1 parent b73d8d2 commit a01a224
Show file tree
Hide file tree
Showing 167 changed files with 6,499 additions and 6,141 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Ignore all test and documentation with "export-ignore".
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.xml.dist export-ignore
/art export-ignore
/docs export-ignore
/tests export-ignore
/workbench export-ignore
/.editorconfig export-ignore
/.php_cs.dist.php export-ignore
/psalm.xml export-ignore
/psalm.xml.dist export-ignore
/testbench.yaml export-ignore
/UPGRADING.md export-ignore
/phpstan.neon.dist export-ignore
/phpstan-baseline.neon export-ignore
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/vendor
/node_modules
composer.phar
composer.lock
.idea
.phpunit.cache
build
composer.lock
coverage
docs
phpstan.neon
vendor
node_modules
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": ["prettier-plugin-tailwindcss"],
"bracketSameLine": false,
"htmlWhitespaceSensitivity": "ignore"
}
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Release Notes

## [v2.0.0](https://github.com/antoniputra/ngeblog/compare/v11.0.5...v11.0.6) - 2024-04-11

* Fix PHPUnit constraint by [@szepeviktor](https://github.com/szepeviktor) in https://github.com/laravel/laravel/pull/6389
* [11.x] Add missing roundrobin transport driver config by [@u01jmg3](https://github.com/u01jmg3) in https://github.com/laravel/laravel/pull/6392
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
File renamed without changes
76 changes: 55 additions & 21 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,84 @@
{
"name": "antoniputra/ngeblog",
"description": "Quickstart Blogging for Laravel application.",
"keywords": [
"laravel",
"blog"
],
"description": "Quickstart Blogging for your brand-new or existing Laravel App.",
"keywords": ["laravel", "blog", "vue", "spa"],
"type": "library",
"homepage": "https://github.com/antoniputra/ngeblog",
"license": "MIT",
"support": {
"issues": "https://github.com/antoniputra/ngeblog/issues",
"source": "https://github.com/antoniputra/ngeblog"
},
"authors": [
{
"name": "Antoni Putra",
"name": "antoniputra",
"email": "[email protected]"
}
],
"require": {
"php": ">=7.0.0",
"illuminate/support": "~5.5",
"laravelcollective/html": "^5.5",
"erusev/parsedown": "^1.6"
"php": "^8.2",
"illuminate/support": "^11.0"
},
"require-dev": {
"mockery/mockery": "0.9.*",
"orchestra/testbench": "~3.5",
"orchestra/database": "~3.5",
"orchestra/testbench-browser-kit": "~3.5",
"phpunit/phpunit": "~6.0",
"laravel/browser-kit-testing": "^2.0"
"laravel/pint": "^1.15",
"orchestra/testbench": "^9.0",
"pestphp/pest": "^2.34",
"phpstan/phpstan": "^1.10"
},
"autoload": {
"psr-4": {
"Antoniputra\\Ngeblog\\": "src/"
"AntoniPutra\\Ngeblog\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Antoniputra\\Ngeblog\\Tests\\": "tests/"
"AntoniPutra\\Ngeblog\\Tests\\": "tests/",
"Workbench\\App\\": "workbench/app/",
"Workbench\\Database\\Factories\\": "workbench/database/factories/",
"Workbench\\Database\\Seeders\\": "workbench/database/seeders/"
}
},
"minimum-stability": "stable",
"extra": {
"laravel": {
"providers": [
"Antoniputra\\Ngeblog\\NgeblogServiceProvider"
"AntoniPutra\\Ngeblog\\NgeblogServiceProvider"
],
"aliases": {
"Ngeblog": "Antoniputra\\Ngeblog\\Facade"
"Ngeblog": "AntoniPutra\\Ngeblog\\Facades\\Ngeblog"
}
}
},
"config": {
"sort-packages": true,
"optimize-autoloader": true,
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"@clear",
"@prepare"
],
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": "@php vendor/bin/testbench workbench:build --ansi",
"serve": [
"npm run build",
"Composer\\Config::disableProcessTimeout",
"@build",
"@php vendor/bin/testbench serve"
],
"lint": [
"@php vendor/bin/phpstan analyse"
],
"test": [
"@php vendor/bin/pest"
],
"test-coverage": "vendor/bin/pest --coverage",
"format": "vendor/bin/pint",
"analyse": "vendor/bin/phpstan analyse"
}
}
59 changes: 59 additions & 0 deletions config/ngeblog.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php

use AntoniPutra\Ngeblog\Http\Middleware\AdminAuthorization;

return [

/*
|--------------------------------------------------------------------------
| Ngeblog Domain
|--------------------------------------------------------------------------
|
| This is the subdomain where Ngeblog will be accessible from. If this
| setting is null, Ngeblog will reside under the same domain as the
| application. Otherwise, this value will serve as the subdomain.
|
*/

'domain' => env('NGEBLOG_DOMAIN'),

/*
|--------------------------------------------------------------------------
| Ngeblog Path
|--------------------------------------------------------------------------
|
| This is the URI path where Ngeblog will be accessible from. Feel free
| to change this path to anything you like.
|
*/

'path' => env('NGEBLOG_PATH', 'ngeblog'),

/*
|--------------------------------------------------------------------------
| Ngeblog Route Middleware
|--------------------------------------------------------------------------
|
| These middleware will get attached onto each Ngeblog route, giving you
| the chance to add your own middleware to this list or change any of
| the existing middleware. Or, you can simply stick with this list.
|
*/

'middleware' => [
'web',
AdminAuthorization::class
],

/*
|--------------------------------------------------------------------------
| Ngeblog Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the Ngeblog to handle Blog Image.
|
*/

'disk' => env('NGEBLOG_DISK', 'public'),
];
38 changes: 38 additions & 0 deletions database/migrations/2024_04_10_000005_create_posts_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('ngeblog_posts', function (Blueprint $table) {
$table->id();
$table->foreignId('author_id')->nullable();
$table->string('title');
$table->string('slug')->unique();
$table->boolean('is_visible')->default(false);
$table->enum('editor_type', ['markdown', 'richtext'])->default('markdown');
$table->string('cover_image_path')->nullable();
$table->timestamp('first_published_at')->nullable();
$table->timestamp('schedule_publish_at')->nullable();
$table->text('excerpt')->nullable();
$table->longText('content');
$table->timestamps();
$table->softDeletes();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('ngeblog_posts');
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,28 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateNgeblogCategoriesTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('ngeblog_categories', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->index()->unsigned();
Schema::create('ngeblog_tags', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->string('slug')->unique();
$table->boolean('is_visible')->default(false);
$table->text('description')->nullable();
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('ngeblog_categories');
Schema::dropIfExists('ngeblog_tags');
}
}
};
31 changes: 31 additions & 0 deletions database/migrations/2024_04_10_000007_create_post_tag_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('ngeblog_post_tag', function (Blueprint $table) {
$table->id();
$table->foreignId('post_id')->constrained('ngeblog_posts')->cascadeOnDelete();
$table->foreignId('tag_id')->constrained('ngeblog_tags')->cascadeOnDelete();
$table->timestamps();

$table->unique(['post_id', 'tag_id']);
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('ngeblog_post_tag');
}
};
670 changes: 670 additions & 0 deletions dist/resolve-ngeblog-dist/Form-IChnj1V9.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions dist/resolve-ngeblog-dist/Form.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/resolve-ngeblog-dist/ngeblog.css

Large diffs are not rendered by default.

Loading

0 comments on commit a01a224

Please sign in to comment.