diff --git a/app/Classes/RusDate.php b/app/Classes/RusDate.php new file mode 100644 index 0000000..0a3cd7f --- /dev/null +++ b/app/Classes/RusDate.php @@ -0,0 +1,47 @@ +orderBy('created_at')->limit(8)->get(); - $news = News::query()->orderByDesc('created_at')->limit(8); - return view('index', compact('houses', 'news')); + $houses = House::with('areas')->orderByDesc('created_at')->limit(8)->get(); + $news = News::query()->orderByDesc('created_at')->limit(8)->get(); + $partners = Partners::query()->limit(18)->get(); + return view('index', compact('houses', 'news', 'partners')); } /* @@ -58,4 +61,19 @@ class MainController extends Controller public function MapsObj() { return view('mapsobj'); } + + /* + * Посмотр конктретного предложение офиса + */ + public function Offer(House $house) { + return view('house.post', compact('house')); + } + + /* + * Просмотр детально конкретной новости + */ + public function DetailNew(News $news) { + $news_list = News::query()->orderByDesc('created_at')->limit(8)->get(); + return view('new.post', compact('news', 'news_list')); + } } diff --git a/app/Models/Partners.php b/app/Models/Partners.php new file mode 100644 index 0000000..582d8f1 --- /dev/null +++ b/app/Models/Partners.php @@ -0,0 +1,11 @@ +id(); + $table->string('name', 255); + $table->string('foto', 255)->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('partners'); + } +}; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index ce15ff4..d71abb7 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -39,5 +39,8 @@ class DatabaseSeeder extends Seeder $this->call(ContactsTableSeeder::class); $this->command->info('Таблица контакты загружена!!'); + $this->call(PartnersTableSeeder::class); + $this->command->info('Таблица партнеры загружена!!'); + } } diff --git a/database/seeders/PartnersTableSeeder.php b/database/seeders/PartnersTableSeeder.php new file mode 100644 index 0000000..960d138 --- /dev/null +++ b/database/seeders/PartnersTableSeeder.php @@ -0,0 +1,109 @@ + 'Сбербанк', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*2*/[ + 'name' => 'Росбанк2', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*3*/[ + 'name' => 'Ренесансбанк3', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*4*/[ + 'name' => 'Тиньковбанк4', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*5*/[ + 'name' => 'Летобанк5', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*6*/[ + 'name' => 'Хоумкредитбанк6', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*7*/[ + 'name' => 'Сбербанк7', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*8*/[ + 'name' => 'Сбербанк8', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*9*/[ + 'name' => 'Сбербанк9', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*10*/[ + 'name' => 'Сбербанк10', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*11*/[ + 'name' => 'Сбербанк11', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*12*/[ + 'name' => 'Сбербанк12', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*13*/[ + 'name' => 'Сбербанк13', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*14*/[ + 'name' => 'Сбербанк14', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*15*/[ + 'name' => 'Сбербанк15', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*16*/[ + 'name' => 'Сбербанк16', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*17*/[ + 'name' => 'Сбербанк17', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*18*/[ + 'name' => 'Сбербанк18', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*19*/[ + 'name' => 'Сбербанк19', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + /*20*/[ + 'name' => 'Сбербанк20', + 'foto' => 'images/partners/partners-item-img-3.png' + ], + ]; + + foreach ($data as $item) { + $albom = new Partners(); + $albom->name = $item['name']; + $albom->foto = $item['foto']; + $albom->save(); + } + } +} diff --git a/resources/views/catalogs/elemhouse.blade.php b/resources/views/catalogs/elemhouse.blade.php index 7050c3c..f6a8d33 100644 --- a/resources/views/catalogs/elemhouse.blade.php +++ b/resources/views/catalogs/elemhouse.blade.php @@ -33,7 +33,7 @@ } ?>
{{ $price }} ₽ -
Подробнее + Подробнее diff --git a/resources/views/catalogs/new.blade.php b/resources/views/catalogs/new.blade.php new file mode 100644 index 0000000..a42aa32 --- /dev/null +++ b/resources/views/catalogs/new.blade.php @@ -0,0 +1,13 @@ +
+
+
{{ $new->title }} +
{{ $new->created_at->format('d') }}{{ \App\Classes\RusDate::russian_month($new->created_at->format('m')) }} {{$new->created_at->format('Y')}}
+
+
+

{{ $new->title }}

Подробнее + + + +
+
+
diff --git a/resources/views/cookies.blade.php b/resources/views/cookies.blade.php new file mode 100644 index 0000000..6b7f411 --- /dev/null +++ b/resources/views/cookies.blade.php @@ -0,0 +1,42 @@ +@extends('layout.site', ['title' => 'Избранное RentTorg']) + +@section('content') +
+
+
+ +

Тут пока что ничего нет...

Выберите идеальную недвижимость +

Здесь вы можете ознакомиться с недвижимостью которая вам понравилось

+
+
+
+
+
+
+
+

Найдите идеальную планировку на сайте Renttorg

+
+
+
+

Нажмите на для добавления недвижемости в избранное

+
+
+
+

Перейдите в избранное или сравнение для выбора планировки

+
+
+
+
+
+@endsection + +@section('form_feedback') + + @include('form.form_feedback') +@endsection + diff --git a/resources/views/house/post.blade.php b/resources/views/house/post.blade.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/resources/views/house/post.blade.php @@ -0,0 +1 @@ + -
+ + @if ($partners->count()) +

Партнеры нашей компании

-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
-
Лого партнера
+ @foreach ($partners as $partner) +
{{ $partner->name }}
+ @endforeach +
-
+
+ @endif +
@@ -348,7 +338,16 @@
-
+ @if ($news->count()) + @foreach($news as $new) + @include('catalogs.new', ['new' => $new]) + @endforeach + @else +

Пока здесь нет новостей!

+ @endif + + +
diff --git a/resources/views/layout/site.blade.php b/resources/views/layout/site.blade.php index be797ce..6a60bb5 100644 --- a/resources/views/layout/site.blade.php +++ b/resources/views/layout/site.blade.php @@ -20,7 +20,7 @@
-
+
- +
@@ -41,7 +41,7 @@
@@ -49,7 +49,7 @@