-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
2,728 additions
and
72,232 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
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,18 @@ | ||
<?php | ||
|
||
namespace Omatech\Mage\App\Events; | ||
|
||
class UserCreated | ||
{ | ||
public $user; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct($user) | ||
{ | ||
$this->user = $user; | ||
} | ||
} |
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,55 @@ | ||
<?php | ||
|
||
namespace Omatech\Mage\App\Http\Controllers; | ||
|
||
use App\Http\Controllers\Controller; | ||
use Omatech\Mage\App\Http\Requests\Translations\CreateRequest; | ||
use Omatech\Mage\App\Repositories\Translation\UpdateTranslation; | ||
use Omatech\Mage\App\Repositories\Translation\ListTranslationsDatatable; | ||
use Omatech\Mage\App\Repositories\Translation\CreateTranslation; | ||
|
||
class TranslationController extends Controller | ||
{ | ||
public function index() | ||
{ | ||
return view('mage::pages.translations.index'); | ||
} | ||
|
||
public function list(ListTranslationsDatatable $translations) | ||
{ | ||
$filter = request()->get('notTranslated'); | ||
$filter = filter_var($filter, FILTER_VALIDATE_BOOLEAN); | ||
|
||
return $translations->make($filter); | ||
} | ||
|
||
public function create() | ||
{ | ||
return view('mage::pages.translations.create'); | ||
} | ||
|
||
public function store(CreateRequest $request, CreateTranslation $translation) | ||
{ | ||
$data = $request->validated(); | ||
|
||
$fields = [ | ||
'key' => $data['translations_key'], | ||
'group' => $data['translations_group'] | ||
]; | ||
|
||
foreach (config('mage.translations.available_locales') as $lang) { | ||
$fields["text->$lang"] = $data["translations_text-$lang"] ?? ''; | ||
} | ||
|
||
$translation->make($fields); | ||
|
||
return redirect(route('mage.translations.index'))->with('status', 'created'); | ||
} | ||
|
||
public function update($id, UpdateTranslation $update) | ||
{ | ||
$params = request('params'); | ||
|
||
$update->make($id, $params['lang'], $params['value']); | ||
} | ||
} |
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
Oops, something went wrong.