abruno / unipvlectures
The package allows to retrieve data lectures data from the unipv engineering websites
Requires
- php: ^8.1
- illuminate/console: ^9.0
- illuminate/database: ^9.0
- illuminate/support: ^9.0
- roach-php/laravel: ^1.0
This package is auto-updated.
Last update: 2025-02-23 19:54:12 UTC
README
unipv/lectures
This package allows to retrieve data from the engineering websites of the University of Pavia.
Installation
composer require abruno/unipvlectures
Once the package is installed package assets must be published by using the artisan command vendor:publish
php artisan vendor:publish --provider="UnipvLectures\Providers\UnipvLectureProvider"
In order to be able to use package assets, package service provider should be registered in your application.
Go to the file config/app.php
.
'providers' => [ // other service providers /* * Package Service Providers... */ UnipvLectures\Providers\UnipvLectureProvider::class, // other Service Providers... ],
After service provider is configured, and package assets are published, migration should be run.
php artisan migrate
Migration will create lectures, courses, teachers, teacher_courses
in your database.
Once table are created command unipv:import-lectures
must be called.
Provide then the right configuration in config/unipvlectures.php
, variables courses_urls
and lectures_urls
.
php artisan unipv:lecturer-import
Wait till the command ends the import.
After data is imported you can start by creating a blade template
. Once it has been created provide its name still in the configuration config/unipvlectures.php
, template
.
return [ /* |-------------------------------------------------------------------------- | Default Template |-------------------------------------------------------------------------- | | This option controls the template used by the root to display data. | */ 'template' => '', /* |-------------------------------------------------------------------------- | Urls used to retrieve Classes |-------------------------------------------------------------------------- | | This option sets the url where to retrieve course names. | */ 'courses_urls' => [], /* |-------------------------------------------------------------------------- | Urls used to retrieve Lecturers |-------------------------------------------------------------------------- | | This option sets the url where to retrieve the lectures. | */ 'lectures_urls' => [], ];
To see the timetable open the linK:
http://localhost:8000/lectures