Skip to content

Commit 7c37ab2

Browse files
committed
init project
0 parents  commit 7c37ab2

File tree

226 files changed

+11012
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+11012
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 4
8+
indent_style = space
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/node_modules
2+
/public/hot
3+
/public/storage
4+
/storage/*.key
5+
/vendor
6+
.env
7+
.env.backup
8+
.phpunit.result.cache
9+
Homestead.json
10+
Homestead.yaml
11+
npm-debug.log
12+
yarn-error.log
13+
storage/logs/laravel.log
14+
/public/api-rendered-markdowns/*
15+
/public/api/
16+
/public/uploads/
17+
/laradock*/
18+
_ide_helper*.php
19+
.phpstorm.meta.php
20+
/.vagrant
21+
/.idea
22+
/.vscode
23+
html-coverage
24+
Vagrantfile
25+
after.sh
26+
aliases
27+
.php-cs-fixer.cache
28+
/psalm_cache/

Abstracts/Actions/Action.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
namespace Mustang\Core\Abstracts\Actions;
4+
5+
use Mustang\Core\Traits\HasRequestCriteriaTrait;
6+
use Illuminate\Support\Facades\DB;
7+
8+
abstract class Action
9+
{
10+
use HasRequestCriteriaTrait;
11+
12+
protected string $ui;
13+
14+
public function transactionalRun(...$arguments)
15+
{
16+
return DB::transaction(function () use ($arguments) {
17+
return static::run(...$arguments);
18+
});
19+
}
20+
21+
public function getUI(): string
22+
{
23+
return $this->ui;
24+
}
25+
26+
public function setUI(string $interface): static
27+
{
28+
$this->ui = $interface;
29+
30+
return $this;
31+
}
32+
}

Abstracts/Actions/SubAction.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Mustang\Core\Abstracts\Actions;
4+
5+
abstract class SubAction extends Action
6+
{
7+
8+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Mustang\Core\Abstracts\Commands;
4+
5+
use Illuminate\Console\Command as LaravelCommand;
6+
7+
abstract class ConsoleCommand extends LaravelCommand
8+
{
9+
/**
10+
* The type of this controller. This will be accessibly mirrored in the Actions.
11+
* Giving each Action the ability to modify it's internal business logic based on the UI type that called it.
12+
*/
13+
public string $ui = 'cli';
14+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace Mustang\Core\Abstracts\Controllers;
4+
5+
use Mustang\Core\Traits\ResponseTrait;
6+
7+
abstract class ApiController extends Controller
8+
{
9+
use ResponseTrait;
10+
11+
/**
12+
* The type of this controller. This will be accessibly mirrored in the Actions.
13+
* Giving each Action the ability to modify it's internal business logic based on the UI type that called it.
14+
*/
15+
public string $ui = 'api';
16+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace Mustang\Core\Abstracts\Controllers;
4+
5+
use Mustang\Core\Traits\HashIdTrait;
6+
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
7+
use Illuminate\Foundation\Bus\DispatchesJobs;
8+
use Illuminate\Foundation\Validation\ValidatesRequests;
9+
use Illuminate\Routing\Controller as LaravelBaseController;
10+
11+
abstract class Controller extends LaravelBaseController
12+
{
13+
use AuthorizesRequests;
14+
use DispatchesJobs;
15+
use ValidatesRequests;
16+
use HashIdTrait;
17+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace Mustang\Core\Abstracts\Controllers;
4+
5+
abstract class WebController extends Controller
6+
{
7+
/**
8+
* The type of this controller. This will be accessibly mirrored in the Actions.
9+
* Giving each Action the ability to modify it's internal business logic based on the UI type that called it.
10+
*/
11+
public string $ui = 'web';
12+
}

Abstracts/Criterias/Criteria.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Mustang\Core\Abstracts\Criterias;
4+
5+
use Prettus\Repository\Contracts\CriteriaInterface as PrettusCriteria;
6+
7+
abstract class Criteria implements PrettusCriteria
8+
{
9+
10+
}

Abstracts/Events/Event.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Mustang\Core\Abstracts\Events;
4+
5+
use Illuminate\Broadcasting\InteractsWithSockets;
6+
use Illuminate\Foundation\Events\Dispatchable;
7+
use Illuminate\Queue\SerializesModels;
8+
9+
abstract class Event
10+
{
11+
use Dispatchable;
12+
use InteractsWithSockets;
13+
use SerializesModels;
14+
}

0 commit comments

Comments
 (0)