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 @@ } ?>
Здесь вы можете ознакомиться с недвижимостью которая вам понравилось
+Найдите идеальную планировку на сайте Renttorg
+Нажмите на для добавления недвижемости в избранное
+Перейдите в избранное или сравнение для выбора планировки
+