Skip to content

Commit 13c9e32

Browse files
authored
Merge pull request #3 from psc-musicwebproject/laravel
Midterm 2 Progress to main
2 parents 28bcf5f + 87b29b8 commit 13c9e32

110 files changed

Lines changed: 4894 additions & 366 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
17+
[docker-compose.yml]
18+
indent_size = 4

.env.example

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# PSC Music Web Application
2+
# Environment Configuration Example
3+
# Could be changed as needed
4+
5+
# PSC Music Application Settings
6+
RESETPASSURI=https://youtu.be/pRRkWQPiVTU
7+
8+
# Laravel Application Settings
9+
APP_NAME=Laravel
10+
APP_ENV=local
11+
APP_KEY=
12+
APP_DEBUG=true
13+
APP_URL=http://localhost
14+
15+
APP_LOCALE=en
16+
APP_FALLBACK_LOCALE=en
17+
APP_FAKER_LOCALE=en_US
18+
19+
APP_MAINTENANCE_DRIVER=file
20+
# APP_MAINTENANCE_STORE=database
21+
22+
PHP_CLI_SERVER_WORKERS=4
23+
24+
BCRYPT_ROUNDS=12
25+
26+
LOG_CHANNEL=stack
27+
LOG_STACK=single
28+
LOG_DEPRECATIONS_CHANNEL=null
29+
LOG_LEVEL=debug
30+
31+
DB_CONNECTION=sqlite
32+
# DB_HOST=127.0.0.1
33+
# DB_PORT=3306
34+
# DB_DATABASE=laravel
35+
# DB_USERNAME=root
36+
# DB_PASSWORD=
37+
38+
SESSION_DRIVER=database
39+
SESSION_LIFETIME=120
40+
SESSION_ENCRYPT=false
41+
SESSION_PATH=/
42+
SESSION_DOMAIN=null
43+
44+
BROADCAST_CONNECTION=log
45+
FILESYSTEM_DISK=local
46+
QUEUE_CONNECTION=database
47+
48+
CACHE_STORE=database
49+
# CACHE_PREFIX=
50+
51+
MEMCACHED_HOST=127.0.0.1
52+
53+
REDIS_CLIENT=phpredis
54+
REDIS_HOST=127.0.0.1
55+
REDIS_PASSWORD=null
56+
REDIS_PORT=6379
57+
58+
MAIL_MAILER=log
59+
MAIL_SCHEME=null
60+
MAIL_HOST=127.0.0.1
61+
MAIL_PORT=2525
62+
MAIL_USERNAME=null
63+
MAIL_PASSWORD=null
64+
MAIL_FROM_ADDRESS="hello@example.com"
65+
MAIL_FROM_NAME="${APP_NAME}"
66+
67+
AWS_ACCESS_KEY_ID=
68+
AWS_SECRET_ACCESS_KEY=
69+
AWS_DEFAULT_REGION=us-east-1
70+
AWS_BUCKET=
71+
AWS_USE_PATH_STYLE_ENDPOINT=false
72+
73+
VITE_APP_NAME="${APP_NAME}"

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* text=auto eol=lf
2+
3+
*.blade.php diff=html
4+
*.css diff=css
5+
*.html diff=html
6+
*.md diff=markdown
7+
*.php diff=php
8+
9+
/.github export-ignore
10+
CHANGELOG.md export-ignore
11+
.styleci.yml export-ignore

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
*.log
2+
.DS_Store
3+
.env
4+
.env.backup
5+
.env.production
6+
.phpactor.json
7+
.phpunit.result.cache
8+
/.fleet
9+
/.idea
10+
/.nova
11+
/.phpunit.cache
12+
/.vscode
13+
/.zed
14+
/auth.json
15+
/node_modules
16+
/public/build
17+
/public/hot
18+
/public/storage
19+
/storage/*.key
20+
/storage/pail
21+
/vendor
22+
Homestead.json
23+
Homestead.yaml
24+
Thumbs.db
25+
bun.lock
26+
composer.lock
27+
package-lock.json
28+
29+
# Build command on staging server
30+
build.sh
31+
32+
# Ignore logo since it may be customized.
33+
public/assets/image/logo.png

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,61 @@
1-
# website
1+
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
2+
3+
<p align="center">
4+
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
5+
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
6+
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
7+
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
8+
</p>
9+
10+
## About Laravel
11+
12+
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
13+
14+
- [Simple, fast routing engine](https://laravel.com/docs/routing).
15+
- [Powerful dependency injection container](https://laravel.com/docs/container).
16+
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
17+
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
18+
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
19+
- [Robust background job processing](https://laravel.com/docs/queues).
20+
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
21+
22+
Laravel is accessible, powerful, and provides tools required for large, robust applications.
23+
24+
## Learning Laravel
25+
26+
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
27+
28+
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
29+
30+
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
31+
32+
## Laravel Sponsors
33+
34+
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
35+
36+
### Premium Partners
37+
38+
- **[Vehikl](https://vehikl.com)**
39+
- **[Tighten Co.](https://tighten.co)**
40+
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
41+
- **[64 Robots](https://64robots.com)**
42+
- **[Curotec](https://www.curotec.com/services/technologies/laravel)**
43+
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
44+
- **[Redberry](https://redberry.international/laravel-development)**
45+
- **[Active Logic](https://activelogic.com)**
46+
47+
## Contributing
48+
49+
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
50+
51+
## Code of Conduct
52+
53+
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
54+
55+
## Security Vulnerabilities
56+
57+
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
58+
59+
## License
60+
61+
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

api/auth/login/index.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

api/auth/logout/index.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

api/db/mysql/connect.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

app/Auth/AdminProvider.php

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
3+
namespace App\Auth;
4+
5+
use Illuminate\Auth\EloquentUserProvider;
6+
use Illuminate\Contracts\Auth\Authenticatable;
7+
8+
class AdminProvider extends EloquentUserProvider
9+
{
10+
/**
11+
* Retrieve a user by their unique identifier.
12+
*
13+
* @param mixed $identifier
14+
* @return \Illuminate\Contracts\Auth\Authenticatable|null
15+
*/
16+
public function retrieveById($identifier)
17+
{
18+
$user = parent::retrieveById($identifier);
19+
20+
return $user && $user->type === 'admin' ? $user : null;
21+
}
22+
23+
/**
24+
* Retrieve a user by the given credentials.
25+
*
26+
* @param array $credentials
27+
* @return \Illuminate\Contracts\Auth\Authenticatable|null
28+
*/
29+
public function retrieveByCredentials(array $credentials)
30+
{
31+
$user = parent::retrieveByCredentials($credentials);
32+
33+
return $user && $user->type === 'admin' ? $user : null;
34+
}
35+
36+
/**
37+
* Validate a user against the given credentials.
38+
*
39+
* @param \Illuminate\Contracts\Auth\Authenticatable $user
40+
* @param array $credentials
41+
* @return bool
42+
*/
43+
public function validateCredentials(Authenticatable $user, array $credentials)
44+
{
45+
$valid = parent::validateCredentials($user, $credentials);
46+
47+
return $valid && $user->type === 'admin';
48+
}
49+
}

0 commit comments

Comments
 (0)