Пример #1
0
 public static function class_init()
 {
     /** @var Settings $settings */
     $settings = resource(Settings::class);
     self::$redis = new \Redis();
     self::$redis->connect($settings->get("redis", "hostname"), $settings->get("redis", "connect_port"));
 }
Пример #2
0
 /**
  * @param $track_id
  * @throws BadAccessException
  */
 public function __construct($track_id)
 {
     $this->settings = resource(Settings::class);
     $this->me = resource(LoggedIn::class);
     if (is_array($track_id)) {
         $this->track_data = $track_id;
     } else {
         $this->track_data = SongDao::getSongUsingId($track_id);
     }
     $this->track_id = $this->track_data[TSongs::ID];
     $this->checkPermission();
 }
Пример #3
0
function make_resource($name, $controller, $options = [])
{
    resource($name, $controller, $options);
    $uri = '/' . str_replace('.', '/{id}/', $name);
    if (in_array('update', array_get($options, 'only'))) {
        post($uri . '/{idz}', ['uses' => $controller . '@update', 'as' => env('API') . '.' . $name . '.update-post']);
    }
    if (in_array('update', array_get($options, 'only'))) {
        post($uri . '/{idz}/update', ['uses' => $controller . '@update', 'as' => env('API') . '.' . $name . '.update2-post']);
    }
    if (in_array('destroy', array_get($options, 'only'))) {
        post($uri . '/{idz}/destroy', ['uses' => $controller . '@destroy', 'as' => env('API') . '.' . $name . '.destroy-post']);
    }
}
Пример #4
0
    public function WymInput($label, $forField, $options = array())
    {
        $this->view->addHeadItem('WymCSS', $this->view->style(resource('wymeditor/skins/default/screen.css'), true));
        $this->view->addHeadItem('WymJS', $this->view->script(resource('wymeditor/jquery.wymeditor.js'), true));
        ?>
        
        <p>
	    <label for="<?php 
        echo $forField;
        ?>
"><?php 
        echo $label;
        ?>
</label>
	        <textarea class="wymeditor" id="<?php 
        echo $forField;
        ?>
" name="<?php 
        echo $forField;
        ?>
"><?php 
        echo $this->view->model->{$forField} != null ? $this->view->o($this->view->model->{$forField}, false) : $this->view->o('<p>&nbsp;</p>', false);
        ?>
</textarea>
	    </p>
        <script type="text/javascript">
        
	        $(document).ready(function() {
	            $('#<?php 
        echo $forField;
        ?>
').wymeditor({
	            	<?php 
        foreach ($options as $k => $v) {
            echo $k . ':' . $v . ',';
        }
        ?>
	            	
	                jQueryPath: '<?php 
        echo resource('jquery-1.2.2-b.js');
        ?>
'
	            });
	        });
	    </script>
        <?php 
    }
Пример #5
0
<?php

get('/', function () {
    return view('layouts.index');
});
resource('/dashboard', 'DashboardController');
resource('products', 'ProductController');
resource('product-types', 'ProductTypeController');
get('/product-photos', function () {
    return \App\ProductPhoto::all();
});
post('products/file-upload/{id}', 'ProductController@fileUpload');
Пример #6
0
<?php

Route::group(['prefix' => 'api/v1'], function () {
    resource('projects.daily-records', DailyRecordsController::class);
});
Пример #7
0
<?php

resource('posts', 'PostController');
//method index
resource('comments', 'CommentController', ['except' => ['index', 'create', 'show']]);
resource('users', 'UserController', ['except' => ['create', 'store']]);
post('posts/{posts}/comments', 'CommentController@store');
//resource('roles', 'RoleController', ['only' => ['show']]);
get('roles/{roles}', 'RoleController@show');
get('tags/{tags}', 'TagController@show');
$router->controllers(['likes' => 'LikeController', 'home' => 'HomeController', 'auth' => 'Auth\\AuthController', 'password' => 'Auth\\PasswordController', '/' => 'WelcomeController']);
//Route::get() or $router->get() or get()
//Route::resource('home', 'HomeController');//method index
// Route::controllers([
// 	'home' => 'HomeController',//method getIndex
// 	'auth' => 'Auth\AuthController',
// 	'password' => 'Auth\PasswordController',
// 	'test' => 'TraianController',
// 	'/' => 'WelcomeController',
// ]);
//Route::controller('/', 'WelcomeController');
Пример #8
0
<?php

require_once 'config.php';
/* ----------------------- ПАРАМЕТРЫ СТРАНИЦЫ ----------------------- */
$page['title'] = 'Лог';
$page['desc'] = 'Лог сервера';
resource(['datatables/datatables/media/css/jquery.dataTables.min.css', 'datatables/datatables/media/js/jquery.dataTables.min.js', <<<JS
    \$(document).ready(function() {
        \$('table').DataTable( {
            "language": {
                "url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Russian.json"
            }
        } );
    } );
JS
]);
/* ---------------------- КОНТРОЛЛЕР СТРАНИЦЫ ----------------------- */
// Запрашиваем записи лога, относящиеся к API
$logs = db_array("SELECT *, " . "DATE_FORMAT(`created_at`, '%d.%m.%y в %H:%m:%s') AS `time` " . "FROM `log`" . "WHERE `type` = 'API'" . "ORDER BY `created_at` DESC");
/* -------------------------- ОТОБРАЖЕНИЕ ------------ */
ob_start();
?>

<h2>Лог запросов к серверу</h2>
<hr />
<table class="display" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>ID</th>
            <th>Время</th>
            <th>Значение</th>
Пример #9
0
<?php

Route::group(['prefix' => 'api/v1'], function () {
    get('daily-appliances', DailyAppliancesController::class . '@all');
    get('projects/{projects}/daily-appliances/total-amount', DailyAppliancesController::class . '@getTotalAmount');
    resource('projects.daily-appliances', DailyAppliancesController::class);
});
Пример #10
0
<?php

require_once 'config.php';
/* ----------------------- ПАРАМЕТРЫ СТРАНИЦЫ ----------------------- */
$page['title'] = 'Список клиентов';
$page['desc'] = 'Редактирование данных в табличной форме (CRUD)';
resource(['datatables/datatables/media/css/jquery.dataTables.min.css', 'datatables/datatables/media/js/jquery.dataTables.min.js']);
// Настройки CRUD редактора на этой странице
$page['crud_editor'] = ['messages' => ['elements_list' => 'Список клиентов', 'delete_success' => 'Клиент успешно удален', 'delete_error' => 'Ошибка при удалении клиента', 'create_success' => 'Клиент успешно создан', 'save_success' => 'Информация о клиенте успешно отредактирована', 'create_error' => 'Ошибка при создании клиента', 'save_error' => 'Ошибка при сохранении данных клиента', 'edit_element' => 'Редактирование клиента', 'create_element' => 'Добавление нового клиента', 'new_element' => 'Добавить клиента'], 'table' => 'users', 'primary_key' => 'id', 'fields' => ['name' => ['desc' => 'Имя', 'type' => 'text', 'dadata' => ['type' => 'NAME'], 'required' => true], 'address' => ['desc' => 'Адрес', 'type' => 'text', 'dadata' => ['type' => 'ADDRESS', 'yandex_map' => true]], 'company' => ['desc' => 'Организация', 'type' => 'text', 'dadata' => ['type' => 'PARTY']], 'bank' => ['desc' => 'Банк', 'type' => 'text', 'dadata' => ['type' => 'BANK']], 'email' => ['desc' => 'Адрес электронной почты', 'type' => 'text', 'dadata' => ['type' => 'EMAIL']], 'create_at' => ['desc' => 'Дата регистрации', 'type' => 'timestamp', 'access_edit' => []]], 'table_list_fields' => ['id' => ['desc' => '#id'], 'name' => ['desc' => 'Имя'], 'address' => ['desc' => 'Адрес'], 'company' => ['desc' => 'Организация'], 'bank' => ['desc' => 'Банк'], 'email' => ['desc' => 'Электронная почта']], 'list_request' => "SELECT * FROM `users`", 'hide_edit' => false, 'sort_column' => 1, 'sort_order' => 'asc', 'display_length' => 5];
/* ---------------------- КОНТРОЛЛЕР СТРАНИЦЫ ----------------------- */
require MC_ROOT . '/scripts/crud_editor/core.php';
/* -------------------------- ОТОБРАЖЕНИЕ ------------ */
ob_start();
?>

<h2><?php 
echo $page['title'];
?>
</h2>
<hr />

<div class="row">
    <div class="col-xs-12 mtop-20">
        <?php 
require MC_ROOT . "/templates/{$page['view']}.php";
?>
    </div><!-- /.col -->
</div><!-- /.row -->
<?php 
require MC_ROOT . '/scripts/render_view.php';
Пример #11
0
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::group(['namespace' => 'Operator', 'prefix' => 'operator', 'middleware' => ['auth', 'operator']], function () {
    get('dashboard', ['as' => 'operator.dashboard', 'uses' => 'DashboardController@index']);
    resource('notif', 'NotifController');
    resource('paket', 'PaketController');
    resource('member', 'MemberController');
    resource('galery', 'GaleryController');
});
Route::group(['prefix' => 'member', 'middleware' => ['auth']], function () {
    Route::resource('reservation', 'ReservationController');
    Route::get('/dashboard', ['as' => 'member.dashboard', 'uses' => 'ReservationController@dashboard']);
    Route::get('/wait/{id}', ['as' => 'wait', 'uses' => 'ReservationController@wait']);
});
Route::get('/', ['as' => 'welcome', 'uses' => 'WelcomeController@index']);
Route::get('/paket_detail/{id}', ['as' => 'paket.detail', 'uses' => 'WelcomeController@show']);
Route::post('/paket_detail/{id}', ['as' => 'paket.detail', 'uses' => 'WelcomeController@show']);
Route::get('/print/tiket/{id}', ['middleware' => 'auth'], function ($id) {
    $reservation = Reservation::with('user', 'paket')->find($id);
    return view('partials.print', compact('reservation'));
});
Route::controller('auth', 'Auth\\AuthController', ['getLogin' => 'auth.login', 'postLogin' => 'post.login', 'getLogout' => 'auth.logout', 'getRegister' => 'auth.register', 'postRegister' => 'post.register']);
Route::controller('password', 'Auth\\PasswordController');
Пример #12
0
        if ($this->u()->hasRole(User::ROLE_USER)) {
            ?>
			<?php 
            $this->addToPane(build_url('task', 'edit', array('projectid' => $childProject->id)), '<img src="' . resource('images/add.png') . '" />', 'Create new task in ' . $childProject->title, 'RightPane');
            ?>
			<?php 
            $this->addToPane(build_url('project', 'edit', array('id' => $childProject->id)), '<img src="' . resource('images/pencil.png') . '" />', 'Edit ' . $childProject->title, 'RightPane');
            ?>
		<?php 
        }
        ?>
		<!--<a href="<?php 
        echo build_url('project', 'view', array('id' => $childProject->id));
        ?>
"><img src="<?php 
        echo resource('images/eye.png');
        ?>
" /></a> -->
		</h3>
		<p>
		<?php 
        $this->bbCode($childProject->description);
        ?>
		</p>
		<div>
			<ul class="largeList">
				<li><?php 
        $this->addToPane(build_url('feature', 'milestonelist', array('milestoneid' => $childProject->id)), "Features", 'Features of ' . $childProject->title);
        ?>
</li>
				<li><a href="#" onclick="$('#project-task-summary-<?php 
Пример #13
0
    ?>
-projects"></div>
            </div>
            
            <div class="info-block">
                <!--<input style="float: right;" type="button" onclick="location.href='<?php 
    echo build_url('client', 'edit', array('id' => $client->id));
    ?>
';" value="Edit" />-->
                
                <h3>
                <a style="float: right;" href="<?php 
    echo build_url('client', 'edit', array('id' => $client->id));
    ?>
"><img src="<?php 
    echo resource('images/pencil.png');
    ?>
" /></a>
                <?php 
    $this->addNote($client->name, $client->id, 'client');
    ?>
                <?php 
    $this->viewNotes($client->id, 'client');
    ?>
                Details
                </h3>
            
                <div class="micro-column gainlayout">
                <p>
                    <strong>Name</strong><br/>
                    <?php 
Пример #14
0
        <?php 
    if ($expense->status == Expense::DENIED) {
        ?>
        	<img title="denied" src="<?php 
        echo resource('images/cross.png');
        ?>
" />
       	<?php 
    }
    ?>
        
        <?php 
    if (!empty($expense->paiddate)) {
        ?>
        	<img src="<?php 
        echo resource('images/coins.png');
        ?>
" title="Paid <?php 
        $this->o($this->u()->formatDate($expense->paiddate));
        ?>
" />
		<?php 
    }
    ?>
        </td>
    </tr>
    <?php 
}
?>
 
    </tbody>
Пример #15
0
<?php

Route::group(['prefix' => 'api/v1'], function () {
    get('subcontractors', SubcontractorsController::class . '@index');
});
Route::group(['middleware' => ['csrftoken']], function () {
    resource('subcontractors', SubcontractorsController::class);
});
Пример #16
0
"><img class="small-icon" src="<?php 
    echo resource('images/pencil.png');
    ?>
" /></a>
        <a class="action-icon" title="Delete Feature" href="#" onclick="if (confirm('Are you sure')) location.href='<?php 
    echo build_url('feature', 'delete', array('id' => $feature->id));
    ?>
'; return false;"><img class="small-icon" src="<?php 
    echo resource('images/delete.png');
    ?>
" /></a>
        <a class="action-icon" title="Add Child Feature" href="<?php 
    echo build_url('feature', 'edit', array('parent' => $feature->id, 'projectid' => $feature->projectid));
    ?>
"><img class="small-icon" src="<?php 
    echo resource('images/page_copy.png');
    ?>
" /></a>
 
        <a id="<?php 
    echo $type;
    ?>
-feature-<?php 
    echo $feature->id;
    ?>
-link" title="Show Details" href="#"><?php 
    $this->o($feature->title);
    ?>
 (<?php 
    $this->o($feature->estimated);
    ?>
Пример #17
0
    ?>
    	<form id="quick-task-form" style="float: right">
    		<?php 
    $this->requestValidator();
    ?>
    		<input type="text" id="quick-task" size="40" accesskey="a" /> <input type="submit" value="Create Task" />
    	</form>
    	<?php 
}
?>
	</div>
	<div id="content">

		<div id="ajax-loading" style="position: absolute; top: 15px; right: 15px; display: none;">
	    	<img src="<?php 
echo resource('images/ajax-loader.gif');
?>
" />
    	</div>
		<div id="left">
			<div id="flash">
				<?php 
$this->showFlash($this->childView);
?>
			</div>
			<div id="errors">
				<?php 
$this->errors($this->childView);
?>
			</div>		
			<div>
Пример #18
0
/** VENDOR routes start from here */
resource('vendor', 'MyVendorController');
/** VENDOR routes ends here */
//resource('route','RouteController');
/** Invoice routes starts form here */
resource('invoice', 'InvoiceController');
/** Invoice routes ends form here */
/** Cash In routes starts from here */
resource('cashIn', 'CashInController');
get('ledger', 'CashInController@ledger');
/** Cash In routes ends from here */
/** Cash Out routes starts from here */
resource('cashOut', 'CashOutController');
/** Cash Out routes ends from here */
/** Salary routes starts from here */
resource('salary', 'SalaryController');
get('lists', 'SalaryController@lists');
get('create/{id}', 'SalaryController@create');
get('payment/{id}', 'SalaryController@payment');
post('pay', 'SalaryController@pay');
get('payment/{id}', 'SalaryController@editPayment');
patch('payment/{id}/edit', 'SalaryController@updatePayment');
get('advance', 'SalaryController@advance');
post('payAdvance', 'SalaryController@payAdvance');
get('advance/{id}', 'SalaryController@editAdvance');
/** Salary routes ends from here */
/**
 * Route for MyConfigController <p>
 * These routes defined explicitly because in
 * MyConfigController I used multiple methods for store and delete records </p>
 * Created by smartrahat on Date: 06.09.2015 05:23AM | Last Modified: 10.09.2015 08:03PM
Пример #19
0
//Blog Page
get('/', function () {
    return redirect('/blog');
});
get('blog', 'BlogController@index');
get('blog/{slug}', 'BlogController@showPost');
$router->get('contact', 'ContactController@showForm');
Route::post('contact', 'ContactController@sendContactInfo');
get('rss', 'BlogController@rss');
get('sitemap.xml', 'BlogController@siteMap');
// Admin area
get('admin', function () {
    return redirect('/admin/post');
});
$router->group(['namespace' => 'Admin', 'middleware' => 'auth'], function () {
    resource('admin/post', 'PostController', ['except' => 'show']);
    resource('admin/tag', 'TagController', ['except' => 'show']);
    get('admin/upload', 'UploadController@index');
    post('admin/upload/file', 'UploadController@uploadFile');
    delete('admin/upload/file', 'UploadController@deleteFile');
    post('admin/upload/folder', 'UploadController@createFolder');
    delete('admin/upload/folder', 'UploadController@deleteFolder');
});
// Logging in and out
get('/auth/login', 'Auth\\AuthController@getLogin');
post('/auth/login', 'Auth\\AuthController@postLogin');
get('/auth/logout', 'Auth\\AuthController@getLogout');
// Register...
Route::get('auth/register', 'Auth\\AuthController@getRegister');
Route::post('auth/register', 'Auth\\AuthController@postRegister');
Пример #20
0
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    return view('welcome');
});
resource('payment', 'PaypalPaymentController');
Пример #21
0
    echo $this->ellipsis($this->escape($item->title), 20);
    ?>
					<img onclick="$.post('<?php 
    echo build_url('note', 'deletewatch');
    ?>
', {id:'<?php 
    echo $item->id;
    ?>
', __validation_token: '<?php 
    echo $this->requestValidator(true);
    ?>
',  type:'<?php 
    echo get_class($item);
    ?>
'}, function() {$('#<?php 
    echo $rowId;
    ?>
').remove();}); return false; " alt="unbsubscribe from resource" src="<?php 
    echo resource('images/thumb_down.png');
    ?>
"/>
				</a>
				</div>
			</li>
			<?php 
}
?>
		</ul>
		<div class="clear"></div>
	</div>
</div>
Пример #22
0
<body>
<div id="container">
    <div id="header">
	    <div id="menu">
	    	<ul id="options">
	    		<li><a href="<?php 
echo build_url('client');
?>
" title="Your Company">Home</a></li>
	    	</ul>
	    	<div style="clear: both"></div>
	    </div>
    </div>
    <div id="session-info">
           <img id="ajax-loading" style="float: right; display: none;" src="<?php 
echo resource('images/indicator_circle.gif');
?>
" />
   		<?php 
echo $this->loginOutBox();
?>
   	</div>

	<div id="content-wrapper">
		<div id="flash">
		<?php 
$this->showFlash($this->childView);
?>
		</div>
		<div id="errors">
		<?php 
        get('users/banned', 'UserController@banned')->name('admin.access.users.banned');
        get('users/deleted', 'UserController@deleted')->name('admin.access.users.deleted');
        get('account/confirm/resend/{user_id}', 'UserController@resendConfirmationEmail')->name('admin.account.confirm.resend');
        /**
         * Specific User
         */
        $router->group(['prefix' => 'user/{id}', 'where' => ['id' => '[0-9]+']], function () {
            get('delete', 'UserController@delete')->name('admin.access.user.delete-permanently');
            get('restore', 'UserController@restore')->name('admin.access.user.restore');
            get('mark/{status}', 'UserController@mark')->name('admin.access.user.mark')->where(['status' => '[0,1,2]']);
            get('password/change', 'UserController@changePassword')->name('admin.access.user.change-password');
            post('password/change', 'UserController@updatePassword')->name('admin.access.user.change-password');
        });
    });
    /**
     * Role Management
     */
    $router->group(['namespace' => 'Role'], function () use($router) {
        resource('roles', 'RoleController', ['except' => ['show']]);
    });
    /**
     * Permission Management
     */
    $router->group(['prefix' => 'roles', 'namespace' => 'Permission'], function () use($router) {
        resource('permission-group', 'PermissionGroupController', ['except' => ['index', 'show']]);
        resource('permissions', 'PermissionController', ['except' => ['show']]);
        $router->group(['prefix' => 'groups'], function () {
            post('update-sort', 'PermissionGroupController@updateSort')->name('admin.access.roles.groups.update-sort');
        });
    });
});
Пример #24
0
<?php

/**
 * Frontend Controllers
 */
get('/', ['as' => 'home', 'uses' => 'FrontendController@index']);
get('macros', 'FrontendController@macros');
/**
 * These frontend controllers require the user to be logged in
 */
Route::group(['middleware' => 'auth'], function () {
    get('dashboard', ['as' => 'frontend.dashboard', 'uses' => 'DashboardController@index']);
    resource('profile', 'ProfileController', ['only' => ['edit', 'update']]);
});
Пример #25
0
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    return Redirect::to('/api-docs');
});
Route::group(['prefix' => 'api'], function () {
    post('register', 'TokenAuthController@register');
    post('authenticate', 'TokenAuthController@authenticate');
    get('authenticate/user', 'TokenAuthController@getAuthenticatedUser');
    Route::group(['middleware' => 'jwt.auth'], function () {
        post('logout', 'TokenAuthController@logout');
        resource('appointment_requests', 'AppointmentRequestController', ['except' => ['create', 'edit']]);
        patch('appointment_requests/{id}/confirm', 'AppointmentRequestController@confirm');
        patch('appointment_requests/{id}/cancel', 'AppointmentRequestController@cancel');
    });
});
Пример #26
0
}]);
// Password reset
Route::controllers(['password' => 'Auth\\PasswordController']);
// Registration routes...
get('auth/register', ['as' => 'register', 'uses' => 'Auth\\AuthController@getRegister']);
post('auth/register', ['as' => 'post-register', 'uses' => 'Auth\\AuthController@postRegister']);
get('login/{provider}', ['as' => 'social-register', 'uses' => 'Auth\\AuthController@social_register']);
// Authentication routes...
get('auth/login', ['as' => 'login', 'uses' => 'Auth\\AuthController@getLogin']);
post('auth/login', ['as' => 'post-login', 'uses' => 'Auth\\AuthController@postLogin']);
get('logout', ['as' => 'logout', 'uses' => 'Auth\\AuthController@getLogout']);
get('nglogin', function () {
    return view('nglogin');
});
Route::group(['middleware' => 'auth'], function () {
    resource('profile', 'ProfileController');
    get('profile', function () {
        return redirect()->to("how-i'm-doing");
    });
    get('{name}/personal-stats', ['as' => 'personal-stats', 'uses' => 'StatsController@personalStats']);
    get("how-i'm-doing", ['as' => 'how-im-doing', 'uses' => 'StatsController@index']);
    get('update-login-info/{name}', ['as' => 'edit-login', 'uses' => 'ProfileController@editMyLogin']);
    post('update-login/{user}', ['as' => 'update-login', 'uses' => 'ProfileController@updateMyLogin']);
    //get state: locked or not on web-page
    get('device-state/{id}', 'DeviceController@response');
    get('mostly-checked-per/{week}', ['as' => 'mostly-checked-filter', 'uses' => 'StatsController@index']);
    get('mostly-checked-per/{month}/{s}/{i}', ['as' => 'filter-interval-plus', 'uses' => 'StatsController@index']);
    get('mostly-checked-per/{year}/{s}/{i}', ['as' => 'filter-interval-minus', 'uses' => 'StatsController@index']);
});
Route::group(['prefix' => 'api'], function () {
    //    resource('authenticate',    'AuthenticateController', ['only' => ['index']]);
Пример #27
0
<?php

Route::group(['middleware' => ['csrftoken']], function () {
    resource('projects', ProjectsController::class);
});
Пример #28
0
        get('/', 'LibraryController@index');
        get('search', 'LibraryController@search_');
        get('guidelines', 'LibraryController@guidelines_');
        get('about', 'LibraryController@about_');
        get('contact', 'LibraryController@contact_');
        get('studentdashboard', 'LibraryController@studentdash_');
        get('facultydashboard', 'LibraryController@facultydash_');
        get('librariandashboard', 'LibraryController@librariandash_');
    });
});
Route::group(['namespace' => 'API'], function () {
    Route::group(['prefix' => 'api'], function () {
        resource('libraries', 'LibraryController', ['only' => ['index']]);
        resource('categories', 'CategoryController', ['only' => ['index']]);
        Route::group(['middleware' => ['oauth', 'auth']], function () {
            resource('libraries', 'LibraryController', ['only' => ['store', 'update', 'destroy']]);
            resource('categories', 'CategoryController', ['only' => ['store', 'update', 'destroy']]);
            resource('users', 'UserController', ['except' => ['edit']]);
            get('admin', 'UserController@adminInfo');
            Route::group(['prefix' => 'user'], function () {
                post('change-password', 'UserController@changePassword');
            });
        });
    });
    Route::group(['namespace' => 'Auth'], function () {
        post('oauth/access_token', 'AuthController@login');
    });
});
get('/test', function () {
    return 'test';
});
Пример #29
0
<?php

get('login', 'Auth\\AuthController@getLogin');
post('login', 'Auth\\AuthController@postLogin');
get('logout', 'Auth\\AuthController@getLogout');
get('/', function () {
    return redirect('/♫');
});
get('♫', ['middleware' => 'auth', function () {
    return view('index');
}]);
Route::group(['prefix' => 'api', 'middleware' => 'auth', 'namespace' => 'API'], function () {
    get('/', function () {
        // Just acting as a ping service.
    });
    get('data', 'DataController@index');
    post('settings', 'SettingController@save');
    get('{id}/play', 'SongController@play')->where('id', '[a-f0-9]{32}');
    get('{id}/lyrics', 'SongController@getLyrics')->where('id', '[a-f0-9]{32}');
    post('interaction/play', 'InteractionController@play');
    post('interaction/like', 'InteractionController@like');
    post('interaction/batch/like', 'InteractionController@batchLike');
    post('interaction/batch/unlike', 'InteractionController@batchUnlike');
    resource('playlist', 'PlaylistController');
    put('playlist/{id}/sync', 'PlaylistController@sync')->where(['id' => '\\d+']);
    resource('user', 'UserController');
    put('me', 'UserController@updateProfile');
});
Пример #30
0
    <td>
    <?php 
    if ($record->timesheetid) {
        ?>
    <p><img title="This record is locked and cannot be altered" class="small-icon" src="<?php 
        echo resource('images/lock.png');
        ?>
" /></p> 
    <?php 
    } else {
        ?>
    <p><a title="Delete Record" onclick="Relapse.Tasks.deleteTimesheetRecord(<?php 
        echo $record->id;
        ?>
, this); return false; " href="#"><img class="small-icon" src="<?php 
        echo resource('images/delete.png');
        ?>
" /></a></p>
    <?php 
    }
    ?>
	</td>  
</tr>
<?php 
}
?>
<tr>
    <td></td>
    <td></td>
    
    <td>Total</td>