Skip to content

Commit 5a76485

Browse files
committed
Set Up Project
0 parents  commit 5a76485

Some content is hidden

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

63 files changed

+10966
-0
lines changed

.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: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
APP_NAME=Laravel
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_TIMEZONE=UTC
6+
APP_URL=http://localhost
7+
8+
APP_LOCALE=en
9+
APP_FALLBACK_LOCALE=en
10+
APP_FAKER_LOCALE=en_US
11+
12+
APP_MAINTENANCE_DRIVER=file
13+
# APP_MAINTENANCE_STORE=database
14+
15+
#Google Token มาเอาที่ PK
16+
GOOGLE_CLIENT_ID=
17+
GOOGLE_CLIENT_SECRET=
18+
GOOGLE_REDIRECT_URI=
19+
#MapBox Token มาเอาที่ PK
20+
MAPBOX_ACCESS_TOKEN=
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=mysql
32+
DB_HOST=127.0.0.1
33+
DB_PORT=3306
34+
DB_DATABASE=cluster_4
35+
DB_USERNAME=root
36+
#ใครมี password ใส่ password ของตัวเองก่อน run migration ส่วนใหญ่เครื่อง Mac จะมี
37+
DB_PASSWORD=
38+
39+
SESSION_DRIVER=database
40+
SESSION_LIFETIME=120
41+
SESSION_ENCRYPT=false
42+
SESSION_PATH=/
43+
SESSION_DOMAIN=null
44+
45+
BROADCAST_CONNECTION=log
46+
FILESYSTEM_DISK=local
47+
QUEUE_CONNECTION=database
48+
49+
CACHE_STORE=database
50+
CACHE_PREFIX=
51+
52+
MEMCACHED_HOST=127.0.0.1
53+
54+
REDIS_CLIENT=phpredis
55+
REDIS_HOST=127.0.0.1
56+
REDIS_PASSWORD=null
57+
REDIS_PORT=6379
58+
59+
MAIL_MAILER=log
60+
MAIL_SCHEME=null
61+
MAIL_HOST=127.0.0.1
62+
MAIL_PORT=2525
63+
MAIL_USERNAME=null
64+
MAIL_PASSWORD=null
65+
MAIL_FROM_ADDRESS="[email protected]"
66+
MAIL_FROM_NAME="${APP_NAME}"
67+
68+
AWS_ACCESS_KEY_ID=
69+
AWS_SECRET_ACCESS_KEY=
70+
AWS_DEFAULT_REGION=us-east-1
71+
AWS_BUCKET=
72+
AWS_USE_PATH_STYLE_ENDPOINT=false
73+
74+
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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/.phpunit.cache
2+
/node_modules
3+
/public/build
4+
/public/hot
5+
/public/storage
6+
/storage/*.key
7+
/storage/pail
8+
/vendor
9+
.env
10+
.env.backup
11+
.env.production
12+
.phpactor.json
13+
.phpunit.result.cache
14+
Homestead.json
15+
Homestead.yaml
16+
npm-debug.log
17+
yarn-error.log
18+
/auth.json
19+
/.fleet
20+
/.idea
21+
/.nova
22+
/.vscode
23+
/.zed

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
## 🚀 First-time repository setup
11+
12+
Follow these steps to set up the project for the first time:
13+
14+
1. **Clone this repository to your local machine:**
15+
```bash
16+
git clone https://github.com/OSSD13/cluster4.git
17+
```
18+
19+
2. **Go into the project directory:**
20+
```bash
21+
cd project-name
22+
```
23+
24+
3. **Install dependencies:**
25+
*** If you're cloning this project for the first time, run this command: ***
26+
```bash
27+
composer install
28+
```
29+
30+
*** If someone adds new packages after you pull, you need to run this command: ***
31+
```bash
32+
composer update
33+
```
34+
35+
4. **Configure the .env file:**
36+
```bash
37+
cp .env.example .env
38+
```
39+
40+
5. **Generate the application key:**
41+
```bash
42+
php artisan key:generate
43+
```
44+
45+
7. **Make sure the database configuration in the .env file is correct.**
46+
```env
47+
DB_CONNECTION=mysql
48+
DB_HOST=127.0.0.1
49+
DB_PORT=3306
50+
DB_DATABASE=cluster_4
51+
DB_USERNAME=root
52+
DB_PASSWORD=your_password
53+
```
54+
55+
8. **Run database migrations:**
56+
```bash
57+
php artisan migrate
58+
```
59+
60+
## Requirements
61+
62+
- PHP 8.2+
63+
- Composer
64+
- Laravel 11
65+
- FontAwesome 6.7.2
66+
67+
## License
68+
69+
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

app/Http/Controllers/Controller.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
abstract class Controller
6+
{
7+
//
8+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace App\Http\Middleware;
4+
5+
use Closure;
6+
use Illuminate\Http\Request;
7+
use Symfony\Component\HttpFoundation\Response;
8+
9+
class CheckGoogleLogin
10+
{
11+
/**
12+
* Handle an incoming request.
13+
*
14+
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
15+
*/
16+
public function handle(Request $request, Closure $next): Response
17+
{
18+
return $next($request);
19+
}
20+
}

app/Models/User.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
namespace App\Models;
4+
5+
// use Illuminate\Contracts\Auth\MustVerifyEmail;
6+
use Illuminate\Database\Eloquent\Factories\HasFactory;
7+
use Illuminate\Foundation\Auth\User as Authenticatable;
8+
use Illuminate\Notifications\Notifiable;
9+
10+
class User extends Authenticatable
11+
{
12+
/** @use HasFactory<\Database\Factories\UserFactory> */
13+
use HasFactory, Notifiable;
14+
15+
/**
16+
* The attributes that are mass assignable.
17+
*
18+
* @var list<string>
19+
*/
20+
protected $fillable = [
21+
'name',
22+
'email',
23+
'password',
24+
];
25+
26+
/**
27+
* The attributes that should be hidden for serialization.
28+
*
29+
* @var list<string>
30+
*/
31+
protected $hidden = [
32+
'password',
33+
'remember_token',
34+
];
35+
36+
/**
37+
* Get the attributes that should be cast.
38+
*
39+
* @return array<string, string>
40+
*/
41+
protected function casts(): array
42+
{
43+
return [
44+
'email_verified_at' => 'datetime',
45+
'password' => 'hashed',
46+
];
47+
}
48+
}

app/Providers/AppServiceProvider.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace App\Providers;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class AppServiceProvider extends ServiceProvider
8+
{
9+
/**
10+
* Register any application services.
11+
*/
12+
public function register(): void
13+
{
14+
//
15+
}
16+
17+
/**
18+
* Bootstrap any application services.
19+
*/
20+
public function boot(): void
21+
{
22+
//
23+
}
24+
}

artisan

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use Symfony\Component\Console\Input\ArgvInput;
5+
6+
define('LARAVEL_START', microtime(true));
7+
8+
// Register the Composer autoloader...
9+
require __DIR__.'/vendor/autoload.php';
10+
11+
// Bootstrap Laravel and handle the command...
12+
$status = (require_once __DIR__.'/bootstrap/app.php')
13+
->handleCommand(new ArgvInput);
14+
15+
exit($status);

bootstrap/app.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
use Illuminate\Foundation\Application;
4+
use Illuminate\Foundation\Configuration\Exceptions;
5+
use Illuminate\Foundation\Configuration\Middleware;
6+
7+
return Application::configure(basePath: dirname(__DIR__))
8+
->withRouting(
9+
web: __DIR__.'/../routes/web.php',
10+
commands: __DIR__.'/../routes/console.php',
11+
health: '/up',
12+
)
13+
->withMiddleware(function (Middleware $middleware) {
14+
//
15+
})
16+
->withExceptions(function (Exceptions $exceptions) {
17+
//
18+
})->create();

bootstrap/cache/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

bootstrap/providers.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
App\Providers\AppServiceProvider::class,
5+
];

0 commit comments

Comments
 (0)