Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
i-jurij committed Oct 11, 2024
1 parent 92c3c88 commit 2c85018
Show file tree
Hide file tree
Showing 56 changed files with 5,074 additions and 18,099 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/public/storage
/storage/*.key
/storage/framework
/storage/logs
/vendor
.env
.env.backup
Expand Down
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,48 @@ service page "yes" - страница с услугами, создавать л
для добавления категорий услуг и самих услуг.
Но проще просто вносить изменения в имеющиеся страницы, создавая только страницы услуг и внося расценки.


## Start
Directory Permissions
Laravel will need to write to the bootstrap/cache and storage directories, so you should ensure the web server process owner has permission to write to these directories.

You need to call
```php artisan key:generate```
is following a clone of a pre-created Laravel project.

Install php > 8.1.
Install sql (mysql, mariadb).
Run php and sql service.
Configure your DB in application into "app_root_dir/config/database.php": type, user, password etc.
Configure your DB user and her privilegies in phpmyadmin eg.
Run terminal (console).
Cd into applications root directory.
Execute in console:
```composer install```
```npm install```
```php artisan storage:link```
Then:
if you have DB dump - restore DB from dump and
```php artisan serve```
else
```php artisan migrate```
Create user with admin rights with status "admin" (in phpmyadmin eg) then
```php artisan serve```

For css and js load:
for development or localhost```npm run dev```
for deploy ```npm run build``` then ```git pull``` on server into site root dir.

## Deploy to production
```php artisan optimize```
or
```php artisan optimize:clear```
Then
```php artisan config:cache```
Detail: https://laravel.com/docs/10.x/deployment


## Work
### PAGES edit
/admin/page/create - creating client page:

Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/Moder/ContentEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function index(Request $request)

protected function start()
{
$thisdata = [];
$data['service_page'] = Page::where('publish', 'yes')
->where('service_page', 'yes')
->select('id', 'title', 'img')
Expand Down
109 changes: 55 additions & 54 deletions resources/views/admin_manikur/adm_pages/user_list.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,63 +8,64 @@
@extends('layouts/index_admin')
@section('content')

<div class="content margintb1 ">
<div>
@if (Auth::user()['status']==='admin')
<div class="content margintb1 ">
<div>
@if (Auth::user()['status']==='admin')

<p>
WARNING!!!<br />
You need to leave at least one user with the admin status.
</p>
<p>
WARNING!!!<br />
You need to leave at least one user with the admin status.
</p>

@php
$labelclass = '';
$divclass = "";
if (\Request::getRequestUri() === "/admin/user/remove") {
$res_route = route('admin.user.remove');
$labelclass = "checkbox-btn";
$type = "checkbox";
} elseif (\Request::getRequestUri() === "/admin/user/change") {
$res_route = route('admin.user.show');
$divclass = "form_radio_btn";
$type = "radio";
}
@endphp
<form method="post" action="{{ $res_route }}" id="users_shoose" class="pad form_del_ch">
@php
$labelclass = '';
$divclass = "";
if (str_contains(\Request::getRequestUri(), "/admin/user/remove")) {
$res_route = route('admin.user.remove');
$labelclass = "checkbox-btn";
$type = "checkbox";
} elseif (str_contains(\Request::getRequestUri(), "/admin/user/change")) {
$res_route = route('admin.user.show');
$divclass = "form_radio_btn";
$type = "radio";
}
@endphp

<form method="post" action="{{ $res_route }}" id="users_shoose" class="pad form_del_ch">
@csrf
<div class="form-element margintb1 text_left {{$divclass}}">
@foreach ($content as $user)
<label class="{{$labelclass}}">
<input type = "{{$type}}" id ="user_{{$user->id}}" value="{{$user->id}}" name="user_id[]" />
<span>
<table class="text_left">
<tr>
<td>Name: </td>
<td>{{$user->name}}</td>
</tr>
<tr>
<td>Email: </td>
<td>{{$user->email}}</td>
</tr>
<tr>
<td>Status: </td>
<td>{{$user->status}}</td>
</tr>
</table>
</span>
</label>
@endforeach
</div>
<div class="form-element" id="paginator">{!! $content->render() !!}</div>
<div class="form-element mar">
<button type="submit" form="users_shoose" class="buttons" id="del_ch">Submit</button>
<button type="reset" form="users_shoose" class="buttons">Reset</button>
</div>
</form>
@else
You are not authorized.
@endif
</div>
<div class="form-element margintb1 {{$divclass}}">
@foreach ($content as $user)
<label class="{{$labelclass}}">
<input type="{{$type}}" id="user_{{$user->id}}" value="{{$user->id}}" name="user_id[]" />
<span>
<table class="text_left">
<tr>
<td>Name: </td>
<td>{{$user->name}}</td>
</tr>
<tr>
<td>Email: </td>
<td>{{$user->email}}</td>
</tr>
<tr>
<td>Status: </td>
<td>{{$user->status}}</td>
</tr>
</table>
</span>
</label>
@endforeach
</div>
<div class="form-element" id="paginator">{!! $content->render() !!}</div>
<div class="form-element mar">
<button type="submit" form="users_shoose" class="buttons" id="del_ch">Submit</button>
<button type="reset" form="users_shoose" class="buttons">Reset</button>
</div>
</form>
@else
You are not authorized.
@endif
</div>
</div>

@stop
Loading

0 comments on commit 2c85018

Please sign in to comment.