You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
944 B

<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Jcupitt\Vips\Image;
/*
|--------------------------------------------------------------------------
| 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('/update', function () {
// $user = \App\Models\User::first();
// $user->fill(['name' => 'xxxxxx']);
// $user->saveRich();
// return 'done';
// return view('welcome');
// });
Route::get('/', function (Request $request) {
$image = Image::thumbnail('../public/image.jpg', $request->w);
$image->writeToFile('image-modified.jpg',[
'Q' => $request->q
]);
echo '<img src="image-modified.jpg" alt="">';
});