akshyaraait / school-service
'为Akshyaraa学校应用程序提供的服务提供商'
dev-master
2023-12-28 12:47 UTC
Requires
- akshyaraait/service: dev-master
This package is auto-updated.
Last update: 2024-09-28 14:17:33 UTC
README
学校服务 这是一个Laravel项目,提供RESTful API以管理学校数据,例如学生、教师、课程、成绩和出勤。该项目使用Laravel Passport包进行身份验证和授权,使用Laravel Excel包导入和导出Excel格式的数据。安装 您可以通过以下步骤安装此项目: ● 从GitHub克隆仓库:git clone https://github.com/akshyaraait/school-service.git
● 使用Composer安装依赖项:cd school-service composer install ● 将.env.example文件复制到.env并填写数据库和邮件凭据:cp .env.example .env ● 生成应用程序密钥和Passport的加密密钥:php artisan key:generate php artisan passport:keys ● 运行数据库迁移和种子:php artisan migrate --seed ● 为存储文件夹创建符号链接:php artisan storage:link ● 启动本地开发服务器:php artisan serve
通过Composer安装
您还可以使用Packagist上的Composer安装此项目。为此,您可以使用以下命令
composer require akshyaraait/school-service Usage To use the API, you need to register a user account and obtain an access token. You can use the following endpoints for authentication: ● POST /api/register: Register a new user with the following parameters: name, email, password, and password_confirmation. ● POST /api/login: Login with an existing user account with the following parameters: email and password. You will receive an access token in the response. ● POST /api/logout: Logout from the current user account and revoke the access token. You need to send the Authorization header with the value Bearer {token}. You can use the following endpoints for managing school data: ● GET /api/students: Get a list of all students. You can use the q parameter to search by name, email, or phone number. You can also use the sort parameter to sort by any column, and the page and per_page parameters to paginate the results. You need to send the Authorization header with the value Bearer {token}. ● GET /api/students/{id}: Get a single student by id. You need to send the Authorization header with the value Bearer {token}. ● POST /api/students: Create a new student with the following parameters: name, email, phone, gender, dob, address, photo, and course_id. You need to send the Authorization header with the value Bearer {token} and the Content-Type header with the value multipart/form-data. ● PUT /api/students/{id}: Update an existing student by id with the following parameters: name, email, phone, gender, dob, address, photo, and course_id. You need to send the Authorization header with the value Bearer {token} and the Content-Type header with the value multipart/form-data. ● DELETE /api/students/{id}: Delete an existing student by id. You need to send the Authorization header with the value Bearer {token}. The other endpoints for teachers, courses, grades, and attendance follow the same pattern as the students endpoint. You can check the routes file (routes/api.php) for more details. You can also use the following endpoints for importing and exporting data in Excel format: ● POST /api/import/students: Import students data from an Excel file with the following columns: name, email, phone, gender, dob, address, and course_id. You need to send the Authorization header with the value Bearer {token} and the Content-Type header with the value multipart/form-data. You also need to send the file parameter with the Excel file. ● GET /api/export/students: Export students data to an Excel file. You need to send the Authorization header with the value Bearer {token}. You will receive a download link in the response. The other endpoints for importing and exporting teachers, courses, grades, and attendance follow the same pattern as the students endpoint. You can check the routes file (routes/api.php) for more details. Testing You can run the tests for this project using the following command: php artisan test License This project is licensed under the MIT License. See the LICENSE file for details. I hope this helps you with your project. 😊. Source(s) 1. Service to School 2. Service in Schools - New York City Public Schools 3. An Overview of Public School Services 4. School Service - Purchase school forms 5. About ISS | International Schools Services 