-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3325 from HDInnovations/7.x.x
(Release) v7.2.0
- Loading branch information
Showing
397 changed files
with
18,820 additions
and
12,061 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"attributeJsOptions": { | ||
"semi": true | ||
}, | ||
"phpOptions": { | ||
"singleQuote": true | ||
}, | ||
"useLaravelPint": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*.blade.php] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Format Blade Files | ||
on: [push, pull_request] | ||
jobs: | ||
format-blade-files: | ||
strategy: | ||
matrix: | ||
operating-system: | ||
- ubuntu-22.04 | ||
name: ${{ matrix.operating-system }} | ||
runs-on: ${{ matrix.operating-system }} | ||
steps: | ||
- name: Code Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- name: Configure NPM | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18.x' | ||
- name: Install NPM Dependencies | ||
run: npm install | ||
- name: Run Prettier | ||
run: ./node_modules/.bin/prettier -w * | ||
- name: Commit Changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Blade Style Change (Prettier Blade CI) | ||
commit_user_name: HDVinne | ||
commit_user_email: [email protected] | ||
commit_author: HDVinnie <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ignore all files | ||
/* | ||
|
||
# except /resources/views/**/*.blade.php | ||
!/resources/ | ||
/resources/* | ||
!/resources/views/ | ||
/resources/views/**/*.* | ||
!/resources/views/**/*.blade.php | ||
|
||
# ignored | ||
resources/views/emails | ||
resources/views/rss/show.blade.php | ||
resources/views/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"plugins": [ | ||
"prettier-plugin-blade" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"*.blade.php" | ||
], | ||
"options": { | ||
"parser": "blade", | ||
"printWidth": 100, | ||
"semi": true, | ||
"singleQuote": true | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?php | ||
/** | ||
* NOTICE OF LICENSE. | ||
* | ||
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0 | ||
* The details is bundled with this project in the file LICENSE.txt. | ||
* | ||
* @project UNIT3D Community Edition | ||
* | ||
* @author HDVinnie <[email protected]> | ||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0 | ||
*/ | ||
|
||
namespace App\Http\Controllers\Staff; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Http\Requests\Staff\StoreWikiCategoryRequest; | ||
use App\Http\Requests\Staff\UpdateWikiCategoryRequest; | ||
use App\Models\WikiCategory; | ||
|
||
class WikiCategoryController extends Controller | ||
{ | ||
/** | ||
* Display All Categories. | ||
*/ | ||
public function index(): \Illuminate\Contracts\View\View|\Illuminate\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\Foundation\Application | ||
{ | ||
return view('Staff.wiki_category.index', [ | ||
'wikiCategories' => WikiCategory::orderBy('position')->get(), | ||
]); | ||
} | ||
|
||
/** | ||
* Show Form For Creating A New Category. | ||
*/ | ||
public function create(): \Illuminate\Contracts\View\View|\Illuminate\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\Foundation\Application | ||
{ | ||
return view('Staff.wiki_category.create'); | ||
} | ||
|
||
/** | ||
* Store A Category. | ||
*/ | ||
public function store(StoreWikiCategoryRequest $request): \Illuminate\Http\RedirectResponse | ||
{ | ||
WikiCategory::create($request->validated()); | ||
|
||
return to_route('staff.wiki_categories.index') | ||
->withSuccess('Wiki Category Successfully Added'); | ||
} | ||
|
||
/** | ||
* Category Edit Form. | ||
*/ | ||
public function edit(WikiCategory $wikiCategory): \Illuminate\Contracts\View\View|\Illuminate\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\Foundation\Application | ||
{ | ||
return view('Staff.wiki_category.edit', [ | ||
'wikiCategory' => $wikiCategory, | ||
]); | ||
} | ||
|
||
/** | ||
* Update A Category. | ||
*/ | ||
public function update(UpdateWikiCategoryRequest $request, WikiCategory $wikiCategory): \Illuminate\Http\RedirectResponse | ||
{ | ||
$wikiCategory->update($request->validated()); | ||
|
||
return to_route('staff.wiki_categories.index') | ||
->withSuccess('Wiki Category Successfully Modified'); | ||
} | ||
|
||
/** | ||
* Destroy A Category. | ||
*/ | ||
public function destroy(WikiCategory $wikiCategory): \Illuminate\Http\RedirectResponse | ||
{ | ||
$wikiCategory->delete(); | ||
|
||
return to_route('staff.wiki_categories.index') | ||
->withSuccess('Wiki Category Successfully Deleted'); | ||
} | ||
} |
Oops, something went wrong.