Esempio n. 1
0
    public function delete($id, $ajax = false)
    {
        $user = User::find($id);
        $errors = $user->validate_custom();
        if (count($errors)) {
            return Redirect::to(admin_uri('users'))->withErrors($errors);
        }
        $user->delete();
        return Redirect::to(admin_uri('users'))->with('success', '
			<p>User successfully deleted.</p>
			<p><a href="' . admin_url('users/restore/' . $user->id) . '">Undo</a></p>
		');
    }
Esempio n. 2
0
 public function attempt_signin()
 {
     Auth::logout();
     $rules = array('loguser' => 'required', 'logpass' => 'required');
     $validator = Validator::make(Input::all(), $rules);
     if ($validator->fails()) {
         return Redirect::to(admin_uri())->withInput()->withErrors($validator);
     }
     // Users can use either their username or their email to login, so
     // we'll have to do 2 checks.
     $usernameCheck = array('username' => Input::get('loguser'), 'password' => Input::get('logpass'));
     $emailCheck = array('email' => Input::get('loguser'), 'password' => Input::get('logpass'));
     if (Auth::attempt($usernameCheck, Input::get('remember')) || Auth::attempt($emailCheck, Input::get('remember'))) {
         return Redirect::intended(admin_uri());
     }
     return Redirect::to(admin_uri())->withInput()->withErrors('Login attempt failed.');
 }
Esempio n. 3
0
 public function update()
 {
     $Setting = App::make('Setting');
     foreach ($Setting::currentSettings() as $key => $setting) {
         if (!Input::exists($key) || Input::get($key) === $setting['value']) {
             continue;
         }
         $setting = $Setting::find($key);
         if (!$setting) {
             $setting = new $Setting();
             $setting->key = $key;
         }
         $setting->value = Input::get($key);
         $setting->save();
     }
     return Redirect::to(admin_uri('settings'))->with('success', 'Settings updated.');
 }
Esempio n. 4
0
 // AdminMenuController
 //------------------------
 Route::group(array('prefix' => 'menus'), function () {
     $controller = 'AdminMenuController';
     Route::get('/', array('uses' => $controller . '@index'));
     Route::get('add', array('uses' => $controller . '@add'));
     Route::post('add', array('before' => 'csrf', 'uses' => $controller . '@attempt_add'));
     Route::get('edit/{id}', array('uses' => $controller . '@edit'));
     Route::post('edit/{id}', array('before' => 'csrf', 'uses' => $controller . '@attempt_edit'));
     Route::post('delete/{id}', array('before' => 'csrf', 'uses' => $controller . '@delete'));
     Route::post('model-drop-down', array('uses' => $controller . '@model_drop_down'));
     Route::group(array('prefix' => 'items'), function () {
         $controller = 'AdminMenuItemController';
         Route::get('/', function () {
             Session::reflash();
             return Redirect::to(admin_uri('menus'));
         });
         Route::post('add', array('before' => 'csrf', 'uses' => $controller . '@attempt_add'));
         Route::post('order', array('uses' => $controller . '@order'));
         Route::get('edit/{id}', array('uses' => $controller . '@edit'));
         Route::post('edit/{id}', array('before' => 'csrf', 'uses' => $controller . '@attempt_edit'));
         Route::post('delete/{id}/{ajax?}', array('uses' => $controller . '@delete'));
     });
 });
 //------------------------
 // AdminLinkController
 //------------------------
 Route::group(array('prefix' => 'links'), function () {
     $controller = 'AdminLinkController';
     Route::get('/', array('uses' => $controller . '@index'));
     Route::get('add', array('uses' => $controller . '@add'));
Esempio n. 5
0
<?php

use Cartalyst\Extensions\ExtensionInterface;
use Illuminate\Foundation\Application;
return ['name' => 'Jobs', 'slug' => 'citysnap/jobs', 'author' => 'Carter Cochran', 'description' => 'Job Listings', 'version' => '0.1.0', 'require' => ['platform/admin', 'platform/attributes'], 'autoload' => 'composer', 'register' => function (ExtensionInterface $extension, Application $app) {
}, 'boot' => function (ExtensionInterface $extension, Application $app) {
}, 'routes' => function (ExtensionInterface $extension, Application $app) {
    Route::group(['namespace' => 'Citysnap\\Jobs\\Controllers\\Admin'], function () {
        Route::group(['prefix' => admin_uri() . '/jobs'], function () {
            Route::get('/', 'JobsController@index');
            Route::get('job-titles', 'JobsController@listJobTitles');
            Route::get('job-stats', 'JobsController@listJobTitleStats');
            Route::get('employer-data', 'JobsController@getEmployerData');
        });
    });
    Route::group(['namespace' => 'Citysnap\\Jobs\\Controllers\\Frontend'], function () {
        Route::group(['prefix' => '/jobs'], function () {
            Route::get('/', 'JobsController@index');
            Route::get('job-titles', 'JobsController@listJobTitles');
            Route::get('job-stats', 'JobsController@listJobTitleStats');
            Route::get('employer-data', 'JobsController@getEmployerData');
        });
    });
}, 'seeds' => [], 'permissions' => function () {
    return [];
}, 'widgets' => function () {
}, 'settings' => function () {
}, 'menus' => ['admin' => [['slug' => 'admin-citysnap-jobs', 'name' => 'Jobs', 'class' => 'fa fa-money', 'uri' => 'jobs']], 'main' => [['slug' => 'main-citysnap-jobs', 'name' => 'Jobs', 'class' => 'fa fa-money', 'uri' => 'jobs']]]];
Esempio n. 6
0
<?php

use Cartalyst\Extensions\ExtensionInterface;
use Illuminate\Foundation\Application;
return ['name' => 'Rentals', 'slug' => 'citysnap/rentals', 'author' => 'Carter Cochran', 'description' => 'Home and Apartment Rentals', 'version' => '0.1.0', 'require' => ['platform/admin', 'platform/attributes'], 'autoload' => 'composer', 'register' => function (ExtensionInterface $extension, Application $app) {
}, 'boot' => function (ExtensionInterface $extension, Application $app) {
}, 'routes' => function (ExtensionInterface $extension, Application $app) {
    Route::group(['namespace' => 'Citysnap\\Rentals\\Controllers\\Admin'], function () {
        Route::group(['prefix' => admin_uri() . '/rentals'], function () {
            Route::get('/', 'RentalsController@index');
        });
    });
    Route::group(['namespace' => 'Citysnap\\Rentals\\Controllers\\Frontend'], function () {
        Route::group(['prefix' => '/rentals'], function () {
            Route::get('/', 'RentalsController@index');
        });
    });
}, 'seeds' => [], 'permissions' => function () {
    return [];
}, 'widgets' => function () {
}, 'settings' => function () {
}, 'menus' => ['admin' => [['slug' => 'admin-citysnap-rentals', 'name' => 'Rentals', 'class' => 'fa fa-home', 'uri' => 'rentals']], 'main' => [['slug' => 'main-citysnap-rentals', 'name' => 'Rentals', 'class' => 'fa fa-home', 'uri' => 'rentals']]]];
Esempio n. 7
0
/*
|--------------------------------------------------------------------------
| Route Overrides
|--------------------------------------------------------------------------
|
| Because we use an internal REST API, you have the ability to override
| any route for an API call to your own logic. This makes extending
| Platform extremely easy and can be done from anywhere.
|
*/
Route::group(array('prefix' => '{api}/v1'), function () use($app) {
    // Override an API route
});
// Only route admin routes if the admin extension is installed
if (function_exists('admin_uri')) {
    Route::group(array('prefix' => admin_uri()), function () use($app) {
        // Override an admin route
    });
}
/*
|--------------------------------------------------------------------------
| Model Overrides
|--------------------------------------------------------------------------
|
| The default Platform extensions use the IoC to resolve model instances.
| You can override these here by simply returning your own model which
| extends ours.
|
*/
// Extension: platform/attributes
// $app['Platform\Attributes\Models\Attribute'] = new My\Platform\Attributes\Models\Attribute;
Esempio n. 8
0
    public function add_redirect($menuItem)
    {
        return Redirect::to(admin_uri('menus'))->with('success', '
			<p>Link created.</p>
		');
    }
Esempio n. 9
0
        Route::get('/', 'ContactusformsController@index');
    });
    Route::group(['prefix' => admin_uri() . '/standardforms/joincompetitions', 'namespace' => 'Ocs\\Standardforms\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.ocs.standardforms.joincompetitions.all', 'uses' => 'JoincompetitionsController@index']);
        Route::post('/', ['as' => 'admin.ocs.standardforms.joincompetitions.all', 'uses' => 'JoincompetitionsController@executeAction']);
        Route::get('grid', ['as' => 'admin.ocs.standardforms.joincompetitions.grid', 'uses' => 'JoincompetitionsController@grid']);
        Route::get('create', ['as' => 'admin.ocs.standardforms.joincompetitions.create', 'uses' => 'JoincompetitionsController@create']);
        Route::post('create', ['as' => 'admin.ocs.standardforms.joincompetitions.create', 'uses' => 'JoincompetitionsController@store']);
        Route::get('{id}', ['as' => 'admin.ocs.standardforms.joincompetitions.edit', 'uses' => 'JoincompetitionsController@edit']);
        Route::post('{id}', ['as' => 'admin.ocs.standardforms.joincompetitions.edit', 'uses' => 'JoincompetitionsController@update']);
        Route::delete('{id}', ['as' => 'admin.ocs.standardforms.joincompetitions.delete', 'uses' => 'JoincompetitionsController@delete']);
    });
    Route::group(['prefix' => 'standardforms/joincompetitions', 'namespace' => 'Ocs\\Standardforms\\Controllers\\Frontend'], function () {
        Route::get('/', 'JoincompetitionsController@index');
    });
    Route::group(['prefix' => admin_uri() . '/standardforms/bookreferees', 'namespace' => 'Ocs\\Standardforms\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.ocs.standardforms.bookreferees.all', 'uses' => 'BookrefereesController@index']);
        Route::post('/', ['as' => 'admin.ocs.standardforms.bookreferees.all', 'uses' => 'BookrefereesController@executeAction']);
        Route::get('grid', ['as' => 'admin.ocs.standardforms.bookreferees.grid', 'uses' => 'BookrefereesController@grid']);
        Route::get('create', ['as' => 'admin.ocs.standardforms.bookreferees.create', 'uses' => 'BookrefereesController@create']);
        Route::post('create', ['as' => 'admin.ocs.standardforms.bookreferees.create', 'uses' => 'BookrefereesController@store']);
        Route::get('{id}', ['as' => 'admin.ocs.standardforms.bookreferees.edit', 'uses' => 'BookrefereesController@edit']);
        Route::post('{id}', ['as' => 'admin.ocs.standardforms.bookreferees.edit', 'uses' => 'BookrefereesController@update']);
        Route::delete('{id}', ['as' => 'admin.ocs.standardforms.bookreferees.delete', 'uses' => 'BookrefereesController@delete']);
    });
    Route::group(['prefix' => 'standardforms/bookreferees', 'namespace' => 'Ocs\\Standardforms\\Controllers\\Frontend'], function () {
        Route::get('/', 'BookrefereesController@index');
    });
}, 'seeds' => [], 'permissions' => function (Permissions $permissions) {
    $permissions->group('contactusform', function ($g) {
        $g->name = 'Contactusforms';
<?php

use Illuminate\Foundation\Application;
use Cartalyst\Extensions\ExtensionInterface;
use Cartalyst\Settings\Repository as Settings;
use Cartalyst\Permissions\Container as Permissions;
return ['name' => 'Shoppricingexchangecnb', 'slug' => 'sanatorium/shoppricingexchangecnb', 'author' => 'Sanatorium', 'description' => 'Shop pricing  exchange service  CNB', 'version' => '0.1.0', 'require' => ['sanatorium/shoppricing'], 'autoload' => 'composer', 'providers' => ['Sanatorium\\Shoppricingexchangecnb\\Providers\\CNBServiceProvider'], 'routes' => function (ExtensionInterface $extension, Application $app) {
    Route::get('/sanatorium/shoppricingexchangecnb/exchange/', ['as' => 'admin.sanatorium.shoppricingexchangecnb.exchange', 'uses' => 'Sanatorium\\Shoppricingexchangecnb\\Controllers\\Services\\CNBExchangesController@exchange']);
    Route::get('/sanatorium/shoppricingexchangecnb/exchange/history/', ['as' => 'admin.sanatorium.shoppricingexchangecnb.exchange.history', 'uses' => 'Sanatorium\\Shoppricingexchangecnb\\Controllers\\Services\\CNBExchangesController@history']);
    Route::group(['prefix' => admin_uri() . '/shoppricingexchangecnb', 'namespace' => 'Sanatorium\\Shoppricingexchangecnb\\Controllers\\Services'], function () {
        Route::get('/', ['as' => 'admin.sanatorium.shoppricingexchangecnb.all', 'uses' => 'CNBExchangesController@index']);
    });
}, 'seeds' => [], 'permissions' => function (Permissions $permissions) {
}, 'widgets' => function () {
}, 'settings' => function (Settings $settings, Application $app) {
}, 'menus' => ['admin' => [], 'main' => [], 'admin-sanatorium-shoppricing' => [['slug' => 'admin-sanatorium-shoppricingexchangecnb', 'name' => 'Shoppricingexchangecnb', 'class' => 'fa fa-circle-o', 'uri' => 'shoppricingexchangecnb', 'regex' => '/:admin\\/shoppricingexchangecnb/i']]]];
Esempio n. 11
0
use Cartalyst\Permissions\Container as Permissions;
return ['name' => 'Test', 'slug' => 'ocs/test', 'author' => 'sohaila ammar', 'description' => 'aaaa', 'version' => '0.1.0', 'require' => [], 'autoload' => 'composer', 'providers' => ['Ocs\\Test\\ProductsServiceProvider', 'Ocs\\Test\\YyyServiceProvider'], 'routes' => function (ExtensionInterface $extension, Application $app) {
    Route::group(['prefix' => admin_uri() . '/test/products', 'namespace' => 'Ocs\\Test\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.ocs.test.products.all', 'uses' => 'ProductsController@index']);
        Route::post('/', ['as' => 'admin.ocs.test.products.all', 'uses' => 'ProductsController@executeAction']);
        Route::get('grid', ['as' => 'admin.ocs.test.products.grid', 'uses' => 'ProductsController@grid']);
        Route::get('create', ['as' => 'admin.ocs.test.products.create', 'uses' => 'ProductsController@create']);
        Route::post('create', ['as' => 'admin.ocs.test.products.create', 'uses' => 'ProductsController@store']);
        Route::get('{id}', ['as' => 'admin.ocs.test.products.edit', 'uses' => 'ProductsController@edit']);
        Route::post('{id}', ['as' => 'admin.ocs.test.products.edit', 'uses' => 'ProductsController@update']);
        Route::delete('{id}', ['as' => 'admin.ocs.test.products.delete', 'uses' => 'ProductsController@delete']);
    });
    Route::group(['prefix' => 'test/products', 'namespace' => 'Ocs\\Test\\Controllers\\Frontend'], function () {
        Route::get('/', 'ProductsController@index');
    });
    Route::group(['prefix' => admin_uri() . '/test/yyys', 'namespace' => 'Ocs\\Test\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.ocs.test.yyys.all', 'uses' => 'YyysController@index']);
        Route::post('/', ['as' => 'admin.ocs.test.yyys.all', 'uses' => 'YyysController@executeAction']);
        Route::get('grid', ['as' => 'admin.ocs.test.yyys.grid', 'uses' => 'YyysController@grid']);
        Route::get('create', ['as' => 'admin.ocs.test.yyys.create', 'uses' => 'YyysController@create']);
        Route::post('create', ['as' => 'admin.ocs.test.yyys.create', 'uses' => 'YyysController@store']);
        Route::get('{id}', ['as' => 'admin.ocs.test.yyys.edit', 'uses' => 'YyysController@edit']);
        Route::post('{id}', ['as' => 'admin.ocs.test.yyys.edit', 'uses' => 'YyysController@update']);
        Route::delete('{id}', ['as' => 'admin.ocs.test.yyys.delete', 'uses' => 'YyysController@delete']);
    });
    Route::group(['prefix' => 'test/yyys', 'namespace' => 'Ocs\\Test\\Controllers\\Frontend'], function () {
        Route::get('/', 'YyysController@index');
    });
}, 'seeds' => [], 'permissions' => function (Permissions $permissions) {
    $permissions->group('products', function ($g) {
        $g->name = 'Products';
Esempio n. 12
0
<?php

Route::filter('guest', function () {
    if (Auth::check()) {
        return Redirect::to('/')->withErrors('You must be signed out to view that page.');
    }
});
Route::filter('auth', function () {
    if (Auth::guest()) {
        return Redirect::guest(admin_uri())->withErrors('You must be signed in to view that page.');
    }
});
Route::filter('admin', function () {
    if (Auth::guest() || !Auth::user()->is_admin()) {
        return Redirect::guest(admin_uri())->withErrors('You must be signed in as an administrator to view that page.');
    }
});
Route::filter('superadmin', function () {
    if (Auth::guest() || !Auth::user()->is_superadmin()) {
        return Redirect::to(admin_uri())->withErrors('You must be signed in as a super administrator to view that page.');
    }
});
Route::filter('nonadmin', function () {
    if (Auth::check() && Auth::user()->is_admin()) {
        return Redirect::to(admin_uri())->withErrors('Only non-administrators can view that page.');
    }
});
Esempio n. 13
0
<?php

use Illuminate\Foundation\Application;
use Cartalyst\Extensions\ExtensionInterface;
use Cartalyst\Settings\Repository as Settings;
use Cartalyst\Permissions\Container as Permissions;
return ['name' => 'Shop', 'slug' => 'sanatorium/shop', 'author' => 'Sanatorium', 'description' => 'Core shop', 'version' => '0.1.0', 'require' => [], 'autoload' => 'composer', 'providers' => ['Sanatorium\\Shop\\Providers\\ProductServiceProvider'], 'routes' => function (ExtensionInterface $extension, Application $app) {
    Route::group(['prefix' => admin_uri() . '/shop/products', 'namespace' => 'Sanatorium\\Shop\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.sanatorium.shop.products.all', 'uses' => 'ProductsController@index']);
        Route::post('/', ['as' => 'admin.sanatorium.shop.products.all', 'uses' => 'ProductsController@executeAction']);
        Route::get('grid', ['as' => 'admin.sanatorium.shop.products.grid', 'uses' => 'ProductsController@grid']);
        Route::get('create', ['as' => 'admin.sanatorium.shop.products.create', 'uses' => 'ProductsController@create']);
        Route::post('create', ['as' => 'admin.sanatorium.shop.products.create', 'uses' => 'ProductsController@store']);
        Route::get('{id}', ['as' => 'admin.sanatorium.shop.products.edit', 'uses' => 'ProductsController@edit']);
        Route::post('{id}', ['as' => 'admin.sanatorium.shop.products.edit', 'uses' => 'ProductsController@update']);
        Route::delete('{id}', ['as' => 'admin.sanatorium.shop.products.delete', 'uses' => 'ProductsController@delete']);
    });
    Route::group(['prefix' => 'shop/products', 'namespace' => 'Sanatorium\\Shop\\Controllers\\Frontend'], function () {
        Route::get('/', ['as' => 'sanatorium.shop.products.index', 'uses' => 'ProductsController@index']);
    });
}, 'seeds' => [], 'permissions' => function (Permissions $permissions) {
    $permissions->group('product', function ($g) {
        $g->name = 'Products';
        $g->permission('product.index', function ($p) {
            $p->label = trans('sanatorium/shop::products/permissions.index');
            $p->controller('Sanatorium\\Shop\\Controllers\\Admin\\ProductsController', 'index, grid');
        });
        $g->permission('product.create', function ($p) {
            $p->label = trans('sanatorium/shop::products/permissions.create');
            $p->controller('Sanatorium\\Shop\\Controllers\\Admin\\ProductsController', 'create, store');
        });
Esempio n. 14
0
function admin_url($uri = '')
{
    return url(admin_uri($uri));
}
Esempio n. 15
0
 /**
  * Retrieve all the registered routes.
  *
  * @return void
  */
 protected function registeredRoutes()
 {
     $routes = app('router')->getRoutes();
     $adminUri = admin_uri();
     foreach ($routes as $uri) {
         $methods = $uri->getMethods();
         $uri = $uri->getUri();
         if (in_array('GET', $methods) && strpos($uri, '{') === false) {
             if (strpos($uri, $adminUri) !== false) {
                 $this->adminRoutes[] = $uri;
             } else {
                 $this->routes[] = $uri;
             }
         }
     }
 }
Esempio n. 16
0
 /**
  * Handle adding new menu items when creating content (such as pages) from within the menu system.
  *
  * @param AngelModel $object - The model we just added.
  * @return Redirect to the menu index with success message.
  */
 protected function also_add_menu_item($object)
 {
     $MenuItem = App::make('MenuItem');
     $menuItem = new $MenuItem();
     $menuItem->skipEvents = true;
     $menuItem->menu_id = Input::get('menu_id');
     $menuItem->fmodel = $this->Model;
     $menuItem->fid = $object->id;
     $menuItem->order = $MenuItem::where('menu_id', Input::get('menu_id'))->count();
     $menuItem->save();
     return Redirect::to(admin_uri('menus'))->with('success', $this->Model . ' and menu link successfully created.');
 }
Esempio n. 17
0
        Route::get('/', ['as' => 'sanatorium.shoppricing.currencies.index', 'uses' => 'CurrenciesController@index']);
    });
    Route::group(['prefix' => admin_uri() . '/shoppricing/money', 'namespace' => 'Sanatorium\\Shoppricing\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.sanatorium.shoppricing.money.all', 'uses' => 'MoneyController@index']);
        Route::post('/', ['as' => 'admin.sanatorium.shoppricing.money.all', 'uses' => 'MoneyController@executeAction']);
        Route::get('grid', ['as' => 'admin.sanatorium.shoppricing.money.grid', 'uses' => 'MoneyController@grid']);
        Route::get('create', ['as' => 'admin.sanatorium.shoppricing.money.create', 'uses' => 'MoneyController@create']);
        Route::post('create', ['as' => 'admin.sanatorium.shoppricing.money.create', 'uses' => 'MoneyController@store']);
        Route::get('{id}', ['as' => 'admin.sanatorium.shoppricing.money.edit', 'uses' => 'MoneyController@edit']);
        Route::post('{id}', ['as' => 'admin.sanatorium.shoppricing.money.edit', 'uses' => 'MoneyController@update']);
        Route::delete('{id}', ['as' => 'admin.sanatorium.shoppricing.money.delete', 'uses' => 'MoneyController@delete']);
    });
    Route::group(['prefix' => 'shoppricing/money', 'namespace' => 'Sanatorium\\Shoppricing\\Controllers\\Frontend'], function () {
        Route::get('/', ['as' => 'sanatorium.shoppricing.money.index', 'uses' => 'MoneyController@index']);
    });
    Route::group(['prefix' => admin_uri() . '/shoppricing/currencieshistories', 'namespace' => 'Sanatorium\\Shoppricing\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.sanatorium.shoppricing.currencieshistories.all', 'uses' => 'CurrencieshistoriesController@index']);
        Route::post('/', ['as' => 'admin.sanatorium.shoppricing.currencieshistories.all', 'uses' => 'CurrencieshistoriesController@executeAction']);
        Route::get('grid', ['as' => 'admin.sanatorium.shoppricing.currencieshistories.grid', 'uses' => 'CurrencieshistoriesController@grid']);
        Route::get('create', ['as' => 'admin.sanatorium.shoppricing.currencieshistories.create', 'uses' => 'CurrencieshistoriesController@create']);
        Route::post('create', ['as' => 'admin.sanatorium.shoppricing.currencieshistories.create', 'uses' => 'CurrencieshistoriesController@store']);
        Route::get('history', ['as' => 'admin.sanatorium.shoppricing.currencieshistories.history', 'uses' => 'CurrencieshistoriesController@history']);
        Route::get('{id}', ['as' => 'admin.sanatorium.shoppricing.currencieshistories.edit', 'uses' => 'CurrencieshistoriesController@edit']);
        Route::post('{id}', ['as' => 'admin.sanatorium.shoppricing.currencieshistories.edit', 'uses' => 'CurrencieshistoriesController@update']);
        Route::delete('{id}', ['as' => 'admin.sanatorium.shoppricing.currencieshistories.delete', 'uses' => 'CurrencieshistoriesController@delete']);
    });
    Route::group(['prefix' => 'shoppricing/currencieshistories', 'namespace' => 'Sanatorium\\Shoppricing\\Controllers\\Frontend'], function () {
        Route::get('/', ['as' => 'sanatorium.shoppricing.currencieshistories.index', 'uses' => 'CurrencieshistoriesController@index']);
    });
}, 'seeds' => ['Sanatorium\\Shoppricing\\Database\\Seeds\\CurrenciesTableSeeder'], 'permissions' => function (Permissions $permissions) {
    $permissions->group('currency', function ($g) {
Esempio n. 18
0
use Cartalyst\Permissions\Container as Permissions;
return ['name' => 'Finance', 'slug' => 'ocs/finance', 'author' => 'Mona Hashem', 'description' => 'Finance', 'version' => '0.1.0', 'require' => [], 'autoload' => 'composer', 'providers' => ['Ocs\\Finance\\StatementServiceProvider', 'Ocs\\Finance\\TransactionServiceProvider'], 'routes' => function (ExtensionInterface $extension, Application $app) {
    Route::group(['prefix' => admin_uri() . '/finance/statements', 'namespace' => 'Ocs\\Finance\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.ocs.finance.statements.all', 'uses' => 'StatementsController@index']);
        Route::post('/', ['as' => 'admin.ocs.finance.statements.all', 'uses' => 'StatementsController@executeAction']);
        Route::get('grid', ['as' => 'admin.ocs.finance.statements.grid', 'uses' => 'StatementsController@grid']);
        Route::get('create', ['as' => 'admin.ocs.finance.statements.create', 'uses' => 'StatementsController@create']);
        Route::post('create', ['as' => 'admin.ocs.finance.statements.create', 'uses' => 'StatementsController@store']);
        Route::get('{id}', ['as' => 'admin.ocs.finance.statements.edit', 'uses' => 'StatementsController@edit']);
        Route::post('{id}', ['as' => 'admin.ocs.finance.statements.edit', 'uses' => 'StatementsController@update']);
        Route::delete('{id}', ['as' => 'admin.ocs.finance.statements.delete', 'uses' => 'StatementsController@delete']);
    });
    Route::group(['prefix' => 'finance/statements', 'namespace' => 'Ocs\\Finance\\Controllers\\Frontend'], function () {
        Route::get('/', 'StatementsController@index');
    });
    Route::group(['prefix' => admin_uri() . '/finance/transactions', 'namespace' => 'Ocs\\Finance\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.ocs.finance.transactions.all', 'uses' => 'TransactionsController@index']);
        Route::post('/', ['as' => 'admin.ocs.finance.transactions.all', 'uses' => 'TransactionsController@executeAction']);
        Route::get('grid', ['as' => 'admin.ocs.finance.transactions.grid', 'uses' => 'TransactionsController@grid']);
        Route::get('create', ['as' => 'admin.ocs.finance.transactions.create', 'uses' => 'TransactionsController@create']);
        Route::post('create', ['as' => 'admin.ocs.finance.transactions.create', 'uses' => 'TransactionsController@store']);
        Route::get('{id}', ['as' => 'admin.ocs.finance.transactions.edit', 'uses' => 'TransactionsController@edit']);
        Route::post('{id}', ['as' => 'admin.ocs.finance.transactions.edit', 'uses' => 'TransactionsController@update']);
        Route::delete('{id}', ['as' => 'admin.ocs.finance.transactions.delete', 'uses' => 'TransactionsController@delete']);
    });
    Route::group(['prefix' => 'finance/transactions', 'namespace' => 'Ocs\\Finance\\Controllers\\Frontend'], function () {
        Route::get('/', 'TransactionsController@index');
    });
}, 'seeds' => [], 'permissions' => function (Permissions $permissions) {
    $permissions->group('statement', function ($g) {
        $g->name = 'Statements';
Esempio n. 19
0
        Route::get('/', ['as' => 'sanatorium.shoporders.deliveries.index', 'uses' => 'DeliveriesController@index']);
    });
    Route::group(['prefix' => admin_uri() . '/shoporders/paymentstatuses', 'namespace' => 'Sanatorium\\Shoporders\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.sanatorium.shoporders.paymentstatuses.all', 'uses' => 'PaymentstatusesController@index']);
        Route::post('/', ['as' => 'admin.sanatorium.shoporders.paymentstatuses.all', 'uses' => 'PaymentstatusesController@executeAction']);
        Route::get('grid', ['as' => 'admin.sanatorium.shoporders.paymentstatuses.grid', 'uses' => 'PaymentstatusesController@grid']);
        Route::get('create', ['as' => 'admin.sanatorium.shoporders.paymentstatuses.create', 'uses' => 'PaymentstatusesController@create']);
        Route::post('create', ['as' => 'admin.sanatorium.shoporders.paymentstatuses.create', 'uses' => 'PaymentstatusesController@store']);
        Route::get('{id}', ['as' => 'admin.sanatorium.shoporders.paymentstatuses.edit', 'uses' => 'PaymentstatusesController@edit']);
        Route::post('{id}', ['as' => 'admin.sanatorium.shoporders.paymentstatuses.edit', 'uses' => 'PaymentstatusesController@update']);
        Route::delete('{id}', ['as' => 'admin.sanatorium.shoporders.paymentstatuses.delete', 'uses' => 'PaymentstatusesController@delete']);
    });
    Route::group(['prefix' => 'shoporders/paymentstatuses', 'namespace' => 'Sanatorium\\Shoporders\\Controllers\\Frontend'], function () {
        Route::get('/', ['as' => 'sanatorium.shoporders.paymentstatuses.index', 'uses' => 'PaymentstatusesController@index']);
    });
    Route::group(['prefix' => admin_uri() . '/shoporders/deliverystatuses', 'namespace' => 'Sanatorium\\Shoporders\\Controllers\\Admin'], function () {
        Route::get('/', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.all', 'uses' => 'DeliverystatusesController@index']);
        Route::post('/', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.all', 'uses' => 'DeliverystatusesController@executeAction']);
        Route::get('grid', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.grid', 'uses' => 'DeliverystatusesController@grid']);
        Route::get('create', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.create', 'uses' => 'DeliverystatusesController@create']);
        Route::post('create', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.create', 'uses' => 'DeliverystatusesController@store']);
        Route::get('{id}', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.edit', 'uses' => 'DeliverystatusesController@edit']);
        Route::post('{id}', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.edit', 'uses' => 'DeliverystatusesController@update']);
        Route::delete('{id}', ['as' => 'admin.sanatorium.shoporders.deliverystatuses.delete', 'uses' => 'DeliverystatusesController@delete']);
    });
    Route::group(['prefix' => 'shoporders/deliverystatuses', 'namespace' => 'Sanatorium\\Shoporders\\Controllers\\Frontend'], function () {
        Route::get('/', ['as' => 'sanatorium.shoporders.deliverystatuses.index', 'uses' => 'DeliverystatusesController@index']);
    });
}, 'seeds' => [], 'permissions' => function (Permissions $permissions) {
    $permissions->group('order', function ($g) {
        $g->name = 'Orders';
Esempio n. 20
0
<?php

use Illuminate\Foundation\Application;
use Cartalyst\Extensions\ExtensionInterface;
use Cartalyst\Settings\Repository as Settings;
use Cartalyst\Permissions\Container as Permissions;
return ['name' => 'Logs', 'slug' => 'stevebauman/logs', 'author' => 'Steve Bauman', 'description' => 'A site log manager', 'version' => '1.1.2', 'require' => ['platform/access'], 'autoload' => 'composer', 'providers' => ['Stevebauman\\LogReader\\LogReaderServiceProvider'], 'routes' => function (ExtensionInterface $extension, Application $app) {
    $app['router']->group(array('prefix' => admin_uri() . '/logs', 'namespace' => 'Stevebauman\\Logs\\Controllers\\Admin'), function () use($app) {
        $app['router']->get('/', array('as' => 'admin.logs.index', 'uses' => 'LogController@index'));
        $app['router']->post('/', array('as' => 'admin.logs.index', 'uses' => 'LogController@executeAction'));
        $app['router']->get('grid', array('as' => 'admin.logs.grid', 'uses' => 'LogController@grid'));
        $app['router']->get('{id}', array('as' => 'admin.logs.show', 'uses' => 'LogController@show'));
        $app['router']->delete('{id}', array('as' => 'admin.logs.destroy', 'uses' => 'LogController@destroy'));
        $app['router']->get('read/{id}', array('as' => 'admin.logs.read', 'uses' => 'LogController@read'));
    });
}, 'seeds' => [], 'permissions' => function (Permissions $permissions) {
    $permissions->group('logs', function ($g) {
        $g->name = 'Logs';
        $g->permission('logs.index', function ($p) {
            $p->label = 'View Log Entries';
            $p->controller('Stevebauman\\Logs\\Controllers\\Admin\\LogController', 'index, grid');
        });
        $g->permission('logs.read', function ($p) {
            $p->label = 'Mark log entries as read';
            $p->controller('Stevebauman\\Logs\\Controllers\\Admin\\LogController', 'read');
        });
        $g->permission('logs.delete', function ($p) {
            $p->label = 'Delete log entries';
            $p->controller('Stevebauman\\Logs\\Controllers\\Admin\\LogController', 'delete');
        });
    });