см initial commit

This commit is contained in:
vasya
2026-04-11 21:00:51 +03:00
parent ebdcd9485b
commit 3cf31a5d42
4 changed files with 86 additions and 9 deletions
+6 -9
View File
@@ -2,24 +2,21 @@
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
use WithoutModelEvents;
/**
* Seed the application's database.
*/
public function run(): void
{
// User::factory(10)->create();
// \App\Models\User::factory(10)->create();
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
// \App\Models\User::factory()->create([
// 'name' => 'Test User',
// 'email' => 'test@example.com',
// ]);
}
}
+22
View File
@@ -0,0 +1,22 @@
<html>
<head>
@vite(['resources/js/app.js', 'resources/css/app.css'])
<title>Страница с ролями</title>
</head>
<body>
<p>{{ $roleData }}</p>
<!-- <div id='root'></div>
<div id='counter'></div> -->
<script type="module">
//import Example from './Example.js';
// Передаем данные напрямую в компонент
const props = {!! $roleData !!};
console.log(props)
console.log('da')
//ReactDOM.render(<App {...props} />, document.getElementById('root'));
</script>
</body>
</html>
+40
View File
@@ -0,0 +1,40 @@
<html>
<head>
<title>Страница с ролями</title>
</head>
<body>
<table style=border:1px solid black>
<tr>
<th>id роли</th>
<th>имя роли</th>
<th>заголовок роли</th>
<th>удалить</th>
</tr>
@foreach($roles as $role)
<tr>
<td>{{ $role->access_id }}</td>
<td>{{ $role->role }}</td>
<td>{{ $role->title }}</td>
<td>
<form method="POST" action="{{ url('role_del') }}">
@csrf
<input type="hidden" name="access_id" value="{{ $role->access_id }}">
<button type='submit'>Удалить</button>
</form>
</td>
</tr>
@endforeach
</table>
<form method="POST" action="{{ url('role') }}">
@csrf
<label for="input-email">Имя</label>
<input type="text" id="input-name" name="roleName" placeholder="Введите имя роли">
<label for="input-email">Заголовок</label>
<input type="text" id="input-title" name="roleTitle" placeholder="Введите заголовок роли">
<button type="submit">Отправить</button>
</form>
</body>
</html>
+18
View File
@@ -0,0 +1,18 @@
<html>
<head>
<title>Страница с ролями</title>
</head>
<body>
<form method="POST" action="{{ url('test_table') }}">
@csrf
<label for="first_name">Имя</label>
<input type="text" id="first_name" name="first_name" placeholder="Введите имя">
<label for="last_name">Фамилия</label>
<input type="text" id="last_name" name="last_name" placeholder="Введите фамилию">
<label for="department">Отдел</label>
<input type="text" id="department_name" name="department_name" placeholder="Введите отдел">
<button type="submit">Отправить</button>
</form>
</body>
</html>