Skip to content

Add Laravel v12 #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fatfree-3.9
kumbia-1.2
laravel-10.3
laravel-11.0
laravel-12.0
leaf-3.11
lumen-10.0
phroute-2.2
Expand Down
4 changes: 4 additions & 0 deletions laravel-12.0/_benchmark/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
rm -rf !("_benchmark")
find -path './.*' -delete
rm -rf _benchmark/temp
5 changes: 5 additions & 0 deletions laravel-12.0/_benchmark/clear-cache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
# clear cache
php artisan cache:clear
php artisan optimize
echo -e "done"
2 changes: 2 additions & 0 deletions laravel-12.0/_benchmark/hello_world.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
url="$base/$fw/public/index.php/hello/index"
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/*
PHP-Frameworks-Bench
this is a simple hello world controller to make benchmark
*/
namespace App\Http\Controllers;

class HelloWorldController extends Controller {
public function index(): void {
echo 'Hello World!';
}
}

?>
21 changes: 21 additions & 0 deletions laravel-12.0/_benchmark/laravel/public/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

use Illuminate\Http\Request;

define('LARAVEL_START', microtime(true));

// Determine if the application is in maintenance mode...
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
require $maintenance;
}

// Register the Composer autoloader...
require __DIR__.'/../vendor/autoload.php';

// Bootstrap Laravel and handle the request...
(require_once __DIR__.'/../bootstrap/app.php')
->handleRequest(Request::capture());


/* *** PHP-Frameworks-Bench *** */
require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php';
22 changes: 22 additions & 0 deletions laravel-12.0/_benchmark/laravel/routes/web.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
return view('welcome');
});


/* *** PHP-Frameworks-Bench *** */
Route::get('/hello/index', [App\Http\Controllers\HelloWorldController::class, 'index']);
14 changes: 14 additions & 0 deletions laravel-12.0/_benchmark/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
# create project
rm -rf _benchmark/temp
composer create-project --prefer-dist laravel/laravel:12.0.* ./_benchmark/temp --ansi
mv ./_benchmark/temp/{.,}* ./

# have the route & controller
yes|cp -rf _benchmark/laravel/. ./

# some enhancements
composer install --optimize-autoloader --no-dev --ansi
chmod -R o+w storage

rm ./public/.htaccess
11 changes: 11 additions & 0 deletions laravel-12.0/_benchmark/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
composer update

# have the route & controller
yes|cp -rf _benchmark/laravel/. ./

# some enhancements
composer install --optimize-autoloader --no-dev
chmod -R o+w storage

rm ./public/.htaccess
Loading