From 9275187657c1107da7c90b8608268bf8ea0bada0 Mon Sep 17 00:00:00 2001 From: ilmedova Date: Tue, 6 Apr 2021 12:39:14 +0500 Subject: [PATCH] changes to bukja view corrections --- app/Http/Controllers/BukjaController.php | 12 +- app/UserCrudController.php | 9 + ..._04_05_160911_add_bukja_to_users_table.php | 32 ++++ resources/views/web/bukjalar.blade.php | 161 +----------------- 4 files changed, 53 insertions(+), 161 deletions(-) create mode 100644 database/migrations/2021_04_05_160911_add_bukja_to_users_table.php diff --git a/app/Http/Controllers/BukjaController.php b/app/Http/Controllers/BukjaController.php index ae0c6d27..7e023261 100644 --- a/app/Http/Controllers/BukjaController.php +++ b/app/Http/Controllers/BukjaController.php @@ -4,6 +4,7 @@ namespace App\Http\Controllers; use App\Models\BukjaOrder; use App\Models\Folder; +use App\User; use App\Models\PropertyType; use Illuminate\Http\Request; use Illuminate\Support\Facades\Mail; @@ -21,12 +22,15 @@ class BukjaController extends Controller // $folders = $this->getFolders(); $props=$this->getProps(); + $userbukja = User::where('bukja', '!=' , false)->first(); + $email = $userbukja->email; return view('web.bukjalar')->with([ 'title'=>'Mahabat Nyrhnama bukjalary', 'keywords'=>'', 'meta_description'=>'', - 'folders'=>$folders, - 'props'=>$props + 'folders'=> $folders, + 'props'=> $props, + 'email' => $email ]); } @@ -117,9 +121,9 @@ class BukjaController extends Controller - /** + /* Send order to mail "mahabat@turkmentv.gov.tm" - */ + */ public function sendToMail($bukjaOrder){ $data = array( 'id' => utf8_encode($bukjaOrder->id), diff --git a/app/UserCrudController.php b/app/UserCrudController.php index be9d5f7a..c3f358e2 100644 --- a/app/UserCrudController.php +++ b/app/UserCrudController.php @@ -62,6 +62,15 @@ class UserCrudController extends CrudController 'label' => trans('backpack::permissionmanager.email'), 'type' => 'email', ], + [ + 'name' => 'bukja', + 'label' => 'Bukja pochtasy', + 'type' => 'radio', + 'options' => [ // the key will be stored in the db, the value will be shown as label; + 1 => "Shu pochtany ullan", + 0 => "Ullanma buny" + ], + ], [ 'name' => 'password', 'label' => trans('backpack::permissionmanager.password'), diff --git a/database/migrations/2021_04_05_160911_add_bukja_to_users_table.php b/database/migrations/2021_04_05_160911_add_bukja_to_users_table.php new file mode 100644 index 00000000..9dcfae15 --- /dev/null +++ b/database/migrations/2021_04_05_160911_add_bukja_to_users_table.php @@ -0,0 +1,32 @@ +boolean('bukja')->nullable()->default(false); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + // + }); + } +} diff --git a/resources/views/web/bukjalar.blade.php b/resources/views/web/bukjalar.blade.php index bb8564ad..5243debd 100644 --- a/resources/views/web/bukjalar.blade.php +++ b/resources/views/web/bukjalar.blade.php @@ -52,7 +52,7 @@ @@ -105,7 +105,6 @@ Radio Subtitle Web - Umumy bahasy @@ -117,56 +116,6 @@ @isset($table['set_radio']) {{$table['set_radio']}}@endisset @isset($table['set_sub']) {{$table['set_sub']}} @endisset @isset($table['set_web']) {{$table['set_web']}} @endisset - @if($folder->total_price !== '') - @if($k < 1) - -
- @isset($folder->total_price) {{$folder->total_price}} TMT {{$k=$k+1}} @endisset -
- - @endif - @endif - - @endforeach - @endisset - - - - - @endif - @if(!isset($folder->total_price) & $folder->total_price == '') -
-
-

- {{$folder->title}}

-
-
-
-
-
-

{!! $folder->description !!}

-
- - - - - - - - - - - - - @isset($folder->folder_table) - @foreach($folder->folder_table as $table) - - - - - - - @endforeach @endisset @@ -217,7 +166,6 @@ - @@ -229,56 +177,6 @@ - @if($folder->total_price !== '') - @if($k < 1) - - @endif - @endif - - @endforeach - @endisset - -
Wagt aralygyTVRadioSubtitleWebBahasy
@isset($table['time']) {{$table['time']}} @endisset@isset($table['set_tv']) {{$table['set_tv']}} @endisset@isset($table['set_radio']) {{$table['set_radio']}} @endisset@isset($table['set_sub']) {{$table['set_sub']}}@endisset@isset($table['set_web']) {{$table['set_web']}} @endisset {{$table['price'] ?? '0'}} TMT
Radio Subtitle WebUmumy bahasy
@isset($table['set_radio']) {{$table['set_radio']}}@endisset @isset($table['set_sub']) {{$table['set_sub']}} @endisset @isset($table['set_web']) {{$table['set_web']}} @endisset -
- @isset($folder->total_price) {{$folder->total_price}} TMT {{$k=$k+1}} @endisset -
-
-
-
- @endif - @if(!isset($folder->total_price) & $folder->total_price == '') -
-
-

- {{$folder->title}}

-
-
-
-
-
-

{!! $folder->description !!}

-
- - - - - - - - - - - - - @isset($folder->folder_table) - @foreach($folder->folder_table as $table) - - - - - - - @endforeach @endisset @@ -293,7 +191,7 @@ @endif - @if($prop->filter_value==3) + @if($prop->filter_value == 3)

{{$prop->title}}

@@ -329,7 +227,6 @@
- @@ -341,56 +238,6 @@ - @if($folder->total_price !== '') - @if($k < 1) - - @endif - @endif - - @endforeach - @endisset - -
Wagt aralygyTVRadioSubtitleWebBahasy
@isset($table['time']) {{$table['time']}} @endisset@isset($table['set_tv']) {{$table['set_tv']}} @endisset@isset($table['set_radio']) {{$table['set_radio']}} @endisset@isset($table['set_sub']) {{$table['set_sub']}}@endisset@isset($table['set_web']) {{$table['set_web']}} @endisset{{$table['price'] ?? ''}} TMT
Radio Subtitle WebUmumy bahasy
@isset($table['set_radio']) {{$table['set_radio']}}@endisset @isset($table['set_sub']) {{$table['set_sub']}} @endisset @isset($table['set_web']) {{$table['set_web']}} @endisset -
- @isset($folder->total_price) {{$folder->total_price}} TMT {{$k=$k+1}} @endisset -
-
-
-
- @endif - @if(!isset($folder->total_price) & $folder->total_price == '') -
-
-

- {{$folder->title}}

-
-
-
-
-
-

{!! $folder->description !!}

-
- - - - - - - - - - - - - @isset($folder->folder_table) - @foreach($folder->folder_table as $table) - - - - - - - @endforeach @endisset @@ -582,7 +429,7 @@
| - +
{{--For orders--}}
@@ -608,7 +455,7 @@
  • Phone: +993 12 493705
  • Aşgabat şäheri Oguzhan 13
  • -
  • mahabat@turkmentv.gov.tm
  • +
  • {{ $email }}
Wagt aralygyTVRadioSubtitleWebBahasy
@isset($table['time']) {{$table['time']}} @endisset@isset($table['set_tv']) {{$table['set_tv']}} @endisset@isset($table['set_radio']) {{$table['set_radio']}} @endisset@isset($table['set_sub']) {{$table['set_sub']}}@endisset@isset($table['set_web']) {{$table['set_web']}} @endisset{{$table['price'] ?? '0'}} TMT