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

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <?php
  2. use Illuminate\Http\Request;
  3. use Illuminate\Support\Facades\Route;
  4. use Jcupitt\Vips\Image;
  5. /*
  6. |--------------------------------------------------------------------------
  7. | Web Routes
  8. |--------------------------------------------------------------------------
  9. |
  10. | Here is where you can register web routes for your application. These
  11. | routes are loaded by the RouteServiceProvider within a group which
  12. | contains the "web" middleware group. Now create something great!
  13. |
  14. */
  15. // Route::get('/update', function () {
  16. // $user = \App\Models\User::first();
  17. // $user->fill(['name' => 'xxxxxx']);
  18. // $user->saveRich();
  19. // return 'done';
  20. // return view('welcome');
  21. // });
  22. Route::get('/', function (Request $request) {
  23. $image = Image::thumbnail('../public/image.jpg', $request->w);
  24. $image->writeToFile('image-modified.jpg',[
  25. 'Q' => $request->q
  26. ]);
  27. echo '<img src="image-modified.jpg" alt="">';
  28. });