diff --git a/app/Http/Controllers/ServiceLinksController.php b/app/Http/Controllers/ServiceLinksController.php new file mode 100644 index 0000000..9ac78de --- /dev/null +++ b/app/Http/Controllers/ServiceLinksController.php @@ -0,0 +1,15 @@ +all(); + } +} diff --git a/app/Models/ServicesLink.php b/app/Models/ServicesLink.php new file mode 100644 index 0000000..e36755d --- /dev/null +++ b/app/Models/ServicesLink.php @@ -0,0 +1,11 @@ +id(); + $table->string('name', 255); + $table->string('link', 255); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('services_links'); + } +}; diff --git a/resources/service_links.js b/resources/service_links.js new file mode 100644 index 0000000..4e83bb2 --- /dev/null +++ b/resources/service_links.js @@ -0,0 +1,18 @@ +import './js/bootstrap'; +import { createApp } from 'vue' +import { createPinia } from 'pinia' +import App from './views/ServiceLinks/ServicesLinks.vue' +import { createVuetify } from 'vuetify' +import 'vuetify/styles' +import * as components from 'vuetify/components' +import * as directives from 'vuetify/directives' +import '@mdi/font/css/materialdesignicons.css' + +const pinia = createPinia(); + +const vuetify = createVuetify({ + components, + directives +}); + +createApp(App).use(vuetify).use(pinia).mount("#app"); diff --git a/resources/stores/services_list.js b/resources/stores/services_list.js new file mode 100644 index 0000000..46d9a16 --- /dev/null +++ b/resources/stores/services_list.js @@ -0,0 +1,21 @@ +import {defineStore} from "pinia"; +import axios from "axios"; + +export const useServicesList = defineStore('services_list', { + state: () => ({ + links: Object + }), + getters: { + + }, + actions: { + async getList(){ + await axios + .get('/api/v1/services_list') + .then((response) => { + this.links = response.data; + }); + } + + }, +}) diff --git a/resources/views/ServiceLinks/ServicesLinks.vue b/resources/views/ServiceLinks/ServicesLinks.vue new file mode 100644 index 0000000..6682286 --- /dev/null +++ b/resources/views/ServiceLinks/ServicesLinks.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/resources/views/ServiceLinks/links.blade.php b/resources/views/ServiceLinks/links.blade.php new file mode 100644 index 0000000..ed78478 --- /dev/null +++ b/resources/views/ServiceLinks/links.blade.php @@ -0,0 +1,13 @@ + + + + + + Services Links + @vite('resources/service_links.js') + @vite('resources/css/app.css') + + +
+ + diff --git a/routes/api_v1.php b/routes/api_v1.php index c521186..c73445a 100644 --- a/routes/api_v1.php +++ b/routes/api_v1.php @@ -20,3 +20,4 @@ Route::get('/schedules', 'App\Http\Controllers\SchedulesController@index')->name Route::get('/dates', 'App\Http\Controllers\SchedulesController@mmDate')->name('dates'); Route::get('/phrases', 'App\Http\Controllers\BasyaPhrasesController@index')->name('phrases'); Route::post('/rating', 'App\Http\Controllers\RatingController@index')->name('rating'); +Route::get('/services_list', 'App\Http\Controllers\ServiceLinksController@index')->name('services_list'); diff --git a/routes/web.php b/routes/web.php index a7da9c8..2e39981 100644 --- a/routes/web.php +++ b/routes/web.php @@ -33,6 +33,10 @@ Route::get('/friday', function () { return view('friday/friday'); }); +Route::get('/services_list', function () { + return view('ServiceLinks/links'); +}); + Route::get('/download/{file}', 'App\Http\Controllers\DownloadController@download'); diff --git a/vite.config.js b/vite.config.js index ad5b65b..57171e8 100644 --- a/vite.config.js +++ b/vite.config.js @@ -12,7 +12,8 @@ export default defineConfig({ 'resources/welcome.js', 'resources/caesar.js', 'resources/basya.js', - 'resources/friday.js' + 'resources/friday.js', + 'resources/service_links.js' ], refresh: true, }),