This commit is contained in:
2020-12-24 11:38:16 +03:00
parent a0591c39a6
commit 899da1a967
5 changed files with 94 additions and 0 deletions

9
models/Right.php Normal file
View File

@@ -0,0 +1,9 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Permission extends Model {
protected $table = 'users';
}

View File

@@ -0,0 +1,23 @@
(function () {
'use strict';
angular
.module('app')
.controller('TestHelloCtrl', TestHelloCtrl);
TestHelloCtrl.$inject = ['$scope', 'smartRequest', '$location', 'Notification'];
function TestHelloCtrl($scope, smartRequest, $location, Notification) {
$scope.users = [];
$scope.getUsers = function () {
smartRequest.get('php/hello', function (data) {
$scope.users = data.users;
});
};
$scope.update = function () {
$scope.getUsers();
};
$scope.update();
}
})();

19
web/menu_min.js Normal file
View File

@@ -0,0 +1,19 @@
group_name: 'Разработка',
item: [
{
name: 'Тест',
acl: 'test',
icon: 'code',
order: 0,
items: [
{
name: 'Hello',
acl: 'test',
url: 'app.test.hello',
icon: 'line_style',
count: 0,
order: 1
}
]
}
];

8
web/routes_min.js Normal file
View File

@@ -0,0 +1,8 @@
{
code: 'app.test.hello',
url: '/test/hello',
templateUrl: '../views/test_hello.html',
data: { title : 'Hello' },
controller: 'TestHelloCtrl',
resolve: ['scripts/controllers/test_hello.js']
}

35
web/views/test_hello.html Normal file
View File

@@ -0,0 +1,35 @@
<div id="container-floating">
<div class="nd1 nds" data-toggle="tooltip" data-placement="left" title="Обновить" ng-click="update()" style="background-color: #d3a411"
onmouseenter="$(this).tooltip('show')">
<i class="material-icons">&#xE5D5;</i>
</div>
<div id="floating-button" data-toggle="tooltip" data-placement="left" title="Действия" onmouseenter="$(this).tooltip('show')">
<p class="plus">
<i class="material-icons">&#xE5D2;</i>
</p>
<p class="edit">
<i class="material-icons">&#xE5CD;</i>
</p>
</div>
</div>
<div class="padding">
<div class="box">
<div class="table-responsive">
<table class="table table-bordered m-a-0">
<thead>
<th style="width: 20%">#</th>
<th style="width: 80%">Имя</th>
</thead>
<tbody>
<tr ng-repeat="user in users">
<td>{{ user.id }}</td>
<td>{{ user.name }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>