Skip to content

Instantly share code, notes, and snippets.

View noxify's full-sized avatar

Marcus Reinhardt noxify

View GitHub Profile
@noxify
noxify / elixir-extensions.js
Last active November 17, 2016 23:26
simplified asset generation
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var cleanCSS = require('gulp-clean-css');
var pump = require('pump');
var shell = require('gulp-shell');
var Elixir = require('laravel-elixir');
var del = require('del');
var Task = Elixir.Task;
+--------+----------+--------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+--------------------------------------+---------------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
| | GET|HEAD | / | | Closure
<?php
Route::group([
'prefix' => config('infyom.laravel_generator.prefixes.path'),
'middleware' => ['rinvex.fort.backend', 'can:access-dashboard'],
'as' => config('infyom.laravel_generator.prefixes.path').'.',
], function () {
Route::group(['as' => 'users.', 'prefix' => 'users'], function () {
Route::get('/', ['as'=> 'index', 'uses' => 'Admin\UserController@index']);
<?php
namespace App\Http\Controllers\Admin;
use InfyOm\Generator\Utils\ResponseUtil;
use Rinvex\Fort\Http\Controllers\AuthorizedController;
use Response;
/**
<!-- select2 multiple -->
<div @include('crud::inc.field_wrapper_attributes') >
<label>{!! $field['label'] !!}</label>
<select
name="{{ $field['name'] }}[]"
@include('crud::inc.field_attributes', ['default_class' => 'form-control select2_tags'])
public function update(LessonCrudRequest $request)
{
$this->crud->hasAccessOrFail('update');
// replace empty values with NULL, so that it will work with MySQL strict mode on
foreach ($request->input() as $key => $value) {
if (empty($value) && $value !== '0') {
$request->request->set($key, null);
}
}
<?php
/*
* NOTICE OF LICENSE
*
* Part of the Rinvex Fort Package.
*
* This source file is subject to The MIT License (MIT)
* that is bundled with this package in the LICENSE file.
*
<?php
declare(strict_types=1);
namespace Rinvex\Fort\Handlers;
use Illuminate\Http\Request;
use Illuminate\Auth\Events\Lockout;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\Container\Container;
@noxify
noxify / gist:d24f02a5ab90f9291373c2968d0f85ac
Created April 19, 2018 15:27
enable/disable mandant in service manager
/**
* Reference: https://docs.microfocus.com/SM/9.60/Codeless/Content/programming/system_language/reference/rad_function_mandant.htm
* with type 2, we're using the defintion from scsecuritygroup
* This defintion is the base for the "security groups" in the operator file
*/
//set mandant to ADMIN, which is our global mandant see all records
var rcRad = system.functions.mandant(2, ["ADMIN"])
var file = new SCFile("probsummary");
@noxify
noxify / twill.php
Created November 27, 2018 21:41
twill config
<?php
return [
'block_editor' => [
'blocks' => [
'text' => [
'title' => 'Body text 1',
'icon' => 'text',
'component' => 'a17-block-wysiwyg',