Skip to content

Commit cbbbb33

Browse files
author
UfukCetinkaya57
committed
feat: add Laravel scaffold
Template artik hazir bir Laravel projesi iceriyor. composer install ile direkt calisir. - Laravel 12 (official skeleton) - Migration, Factory, Seeder yapisi hazir - PHPUnit test altyapisi - Vite frontend build - BASLARKEN.md kaldirildi - README guncellendi
1 parent 065ae05 commit cbbbb33

47 files changed

Lines changed: 2241 additions & 36 deletions

Some content is hidden

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

.env.example

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

BASLARKEN.md

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

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,24 @@ php artisan serve
2424

2525
| Komut | Aciklama |
2626
|-------|----------|
27-
| php artisan serve | Development server |
28-
| php artisan test | Testleri calistir |
29-
| php artisan migrate | Migration calistir |
30-
| composer install | Bagimliliklari yukle |
27+
| `php artisan serve` | Development server |
28+
| `php artisan test` | Testleri calistir |
29+
| `php artisan migrate` | Migration calistir |
30+
| `composer install` | Bagimliliklari yukle |
31+
32+
## Tech Stack
33+
34+
- **Framework:** Laravel
35+
- **Dil:** PHP 8.2+
36+
- **Frontend Build:** Vite
37+
- **Test:** PHPUnit
3138

3239
## Git Workflow
3340

34-
- main - Production (sadece PR ile merge)
35-
- develop - Development
36-
- feature/xxx - Yeni ozellik
37-
- fix/xxx - Bug fix
41+
- `main` - Production (sadece PR ile merge)
42+
- `develop` - Development
43+
- `feature/xxx` - Yeni ozellik
44+
- `fix/xxx` - Bug fix
3845

3946
### Commit Formati
4047
```
@@ -54,4 +61,4 @@ test(kapsam): test ekleme
5461
## Linkler
5562

5663
- Trello: [Board linki]
57-
- Slack: #proje-[ad]
64+
- Slack: #proje-[ad]
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+
}

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+
}
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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
use Illuminate\Foundation\Application;
5+
use Symfony\Component\Console\Input\ArgvInput;
6+
7+
define('LARAVEL_START', microtime(true));
8+
9+
// Register the Composer autoloader...
10+
require __DIR__.'/vendor/autoload.php';
11+
12+
// Bootstrap Laravel and handle the command...
13+
/** @var Application $app */
14+
$app = require_once __DIR__.'/bootstrap/app.php';
15+
16+
$status = $app->handleCommand(new ArgvInput);
17+
18+
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): void {
14+
//
15+
})
16+
->withExceptions(function (Exceptions $exceptions): void {
17+
//
18+
})->create();

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+
];

composer.json

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"$schema": "https://getcomposer.org/schema.json",
3+
"name": "laravel/laravel",
4+
"type": "project",
5+
"description": "The skeleton application for the Laravel framework.",
6+
"keywords": ["laravel", "framework"],
7+
"license": "MIT",
8+
"require": {
9+
"php": "^8.2",
10+
"laravel/framework": "^12.0",
11+
"laravel/tinker": "^2.10.1"
12+
},
13+
"require-dev": {
14+
"fakerphp/faker": "^1.23",
15+
"laravel/pail": "^1.2.2",
16+
"laravel/pint": "^1.24",
17+
"laravel/sail": "^1.41",
18+
"mockery/mockery": "^1.6",
19+
"nunomaduro/collision": "^8.6",
20+
"phpunit/phpunit": "^11.5.50"
21+
},
22+
"autoload": {
23+
"psr-4": {
24+
"App\\": "app/",
25+
"Database\\Factories\\": "database/factories/",
26+
"Database\\Seeders\\": "database/seeders/"
27+
}
28+
},
29+
"autoload-dev": {
30+
"psr-4": {
31+
"Tests\\": "tests/"
32+
}
33+
},
34+
"scripts": {
35+
"setup": [
36+
"composer install",
37+
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
38+
"@php artisan key:generate",
39+
"@php artisan migrate --force",
40+
"npm install",
41+
"npm run build"
42+
],
43+
"dev": [
44+
"Composer\\Config::disableProcessTimeout",
45+
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1 --timeout=0\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others"
46+
],
47+
"test": [
48+
"@php artisan config:clear --ansi",
49+
"@php artisan test"
50+
],
51+
"post-autoload-dump": [
52+
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
53+
"@php artisan package:discover --ansi"
54+
],
55+
"post-update-cmd": [
56+
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
57+
],
58+
"post-root-package-install": [
59+
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
60+
],
61+
"post-create-project-cmd": [
62+
"@php artisan key:generate --ansi",
63+
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
64+
"@php artisan migrate --graceful --ansi"
65+
],
66+
"pre-package-uninstall": [
67+
"Illuminate\\Foundation\\ComposerScripts::prePackageUninstall"
68+
]
69+
},
70+
"extra": {
71+
"laravel": {
72+
"dont-discover": []
73+
}
74+
},
75+
"config": {
76+
"optimize-autoloader": true,
77+
"preferred-install": "dist",
78+
"sort-packages": true,
79+
"allow-plugins": {
80+
"pestphp/pest-plugin": true,
81+
"php-http/discovery": true
82+
}
83+
},
84+
"minimum-stability": "stable",
85+
"prefer-stable": true
86+
}

0 commit comments

Comments
 (0)