web.php
1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?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::namespace('App\Http\Controllers\V1')->group(function (){
/** web用户跳转登录*/
Route::get('auth/{service}', 'AuthController@redirectToProvider');
Route::get('auth/{service}/callback', 'AuthController@handleProviderCallback');
});
Route::get('/', function () {
return view('welcome');
});
//Route::get('/phpinfo', function () {
// phpinfo();
//});
Route::get('/create_overlay', function () {
header ('Content-Type: image/png');
$im = @imagecreatetruecolor(640, 1008) or die('Cannot Initialize new GD image stream');
$white = imagecolorallocate($im, 255, 255, 255); //创建颜色
imagefill($im,0,0,$white); //自定义画布的背景颜色
$text_color = imagecolorallocate($im, 233, 14, 91); // 文字颜色
$font = storage_path('app/public/ffmpeg/arialuni.ttf');
$text = 'A Simple Text String';
$box = imagettfbbox(40,0,$font,$text);
$x = (640 - ($box[2] - $box[0])) / 2;
$y = (1008 - ($box[7] - $box[1])) / 2;
imagettftext($im,40,0,$x,$y,$text_color,$font,$text);
imagepng($im);
imagedestroy($im);
dd($im);
});
/** 预览邮件发送效果 */
Route::get('/verify_page',function (){
return new \App\Mail\SendVerifyCode('1234');
});