Skip to content

Commit

Permalink
Merge pull request #58 from joanhey/laravel-11
Browse files Browse the repository at this point in the history
Add Laravel 11.0
  • Loading branch information
myaaghubi committed Mar 23, 2024
2 parents 7477ed3 + 605560a commit 018ba3a
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 0 deletions.
1 change: 1 addition & 0 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fatfree-3.8
fuelphp-1.9
kumbia-1.2
laravel-10.3
laravel-11.0
leaf-3.5
lumen-10.0
phroute-2.2
Expand Down
4 changes: 4 additions & 0 deletions laravel-11.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-11.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-11.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-11.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-11.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-11.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:11.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-11.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

0 comments on commit 018ba3a

Please sign in to comment.