-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from joanhey/laravel-11
Add Laravel 11.0
- Loading branch information
Showing
9 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
url="$base/$fw/public/index.php/hello/index" |
14 changes: 14 additions & 0 deletions
14
laravel-11.0/_benchmark/laravel/app/Http/Controllers/HelloWorldController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!'; | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |